2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Reorder chat settings sections.

This commit is contained in:
John Preston
2018-09-28 14:20:36 +03:00
parent 7ee1af5348
commit d485a05935
11 changed files with 52 additions and 34 deletions

View File

@@ -416,7 +416,8 @@ QString DownloadPathText() {
}
void SetupStickersEmoji(not_null<Ui::VerticalLayout*> container) {
AddSkip(container, st::settingsStickersEmojiPadding);
AddDivider(container);
AddSkip(container);
AddSubsectionTitle(container, lng_settings_stickers_emoji);
@@ -472,7 +473,9 @@ void SetupStickersEmoji(not_null<Ui::VerticalLayout*> container) {
AddButton(
container,
lng_stickers_you_have,
st::settingsButton
st::settingsChatButton,
&st::settingsIconStickers,
st::settingsChatIconLeft
)->addClickHandler([] {
Ui::show(Box<StickersBox>(StickersBox::Section::Installed));
});
@@ -910,19 +913,22 @@ void SetupDefaultThemes(not_null<Ui::VerticalLayout*> container) {
}
void SetupThemeOptions(not_null<Ui::VerticalLayout*> container) {
AddDivider(container);
AddSkip(container);
AddSkip(container, st::settingsPrivacySkip);
AddSubsectionTitle(container, lng_settings_themes);
AddSkip(container, st::settingsThemesTopSkip);
SetupDefaultThemes(container);
AddSkip(container, st::settingsThemesBottomSkip);
AddButton(
container,
lng_settings_bg_edit_theme,
st::settingsButton
st::settingsChatButton,
&st::settingsIconThemes,
st::settingsChatIconLeft
)->addClickHandler(App::LambdaDelayed(
st::settingsButton.ripple.hideDuration,
st::settingsChatButton.ripple.hideDuration,
container,
[] { Window::Theme::Editor::Start(); }));
@@ -940,10 +946,10 @@ Chat::Chat(QWidget *parent, not_null<UserData*> self)
void Chat::setupContent() {
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this);
SetupThemeOptions(content);
SetupChatBackground(content);
SetupStickersEmoji(content);
SetupMessages(content);
SetupChatBackground(content);
SetupThemeOptions(content);
Ui::ResizeFitChild(this, content);
}