From ee9a04393ed82bbe933c8695cb2fa2d1c119e276 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 24 May 2022 06:14:52 +0300 Subject: [PATCH] Slightly improved style of premium settings. --- Telegram/SourceFiles/settings/settings.style | 1 + Telegram/SourceFiles/settings/settings_main.cpp | 2 +- Telegram/SourceFiles/settings/settings_premium.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/settings/settings.style b/Telegram/SourceFiles/settings/settings.style index f010f98853..d9467e4b8e 100644 --- a/Telegram/SourceFiles/settings/settings.style +++ b/Telegram/SourceFiles/settings/settings.style @@ -448,3 +448,4 @@ settingsPremiumTopBarClose: IconButton(infoTopBarClose) { color: shadowFg; } } +settingsPremiumLabelDescriptionRightSkip: 46px; diff --git a/Telegram/SourceFiles/settings/settings_main.cpp b/Telegram/SourceFiles/settings/settings_main.cpp index a6a9822608..d0faa42ad3 100644 --- a/Telegram/SourceFiles/settings/settings_main.cpp +++ b/Telegram/SourceFiles/settings/settings_main.cpp @@ -368,7 +368,7 @@ void SetupInterfaceScale( container, tr::lng_settings_default_scale(), icon ? st::settingsButton : st::settingsButtonNoIcon, - { icon ? &st::settingsIconInterfaceScale : nullptr, kIconLightBlue } + { icon ? &st::settingsIconInterfaceScale : nullptr, kIconLightOrange } )->toggleOn(toggled->events_starting_with_copy(switched)); const auto slider = container->add( diff --git a/Telegram/SourceFiles/settings/settings_premium.cpp b/Telegram/SourceFiles/settings/settings_premium.cpp index c72721c522..effef79427 100644 --- a/Telegram/SourceFiles/settings/settings_premium.cpp +++ b/Telegram/SourceFiles/settings/settings_premium.cpp @@ -381,12 +381,12 @@ void Premium::setStepDataReference(std::any &data) { void Premium::setupContent() { const auto content = Ui::CreateChild(this); - AddSkip(content); - const auto &st = st::settingsButton; const auto &stLabel = st::defaultFlatLabel; const auto iconSize = st::settingsPremiumIconDouble.size(); + AddSkip(content, st.padding.top()); + auto entryMap = EntryMap(); auto iconContainers = std::vector(); iconContainers.reserve(int(entryMap.size())); @@ -395,6 +395,7 @@ void Premium::setupContent() { titlePadding.setBottom(0); auto descriptionPadding = st.padding; descriptionPadding.setTop(0); + descriptionPadding.setRight(st::settingsPremiumLabelDescriptionRightSkip); const auto addRow = [&]( rpl::producer &&title, rpl::producer &&text) { @@ -514,7 +515,7 @@ void Premium::setupContent() { tr::lng_premium_summary_bottom_about(Ui::Text::RichLangValue), st::aboutLabel), st::boxRowPadding); - AddSkip(content); + AddSkip(content, st.padding.top() + st.padding.bottom()); Ui::ResizeFitChild(this, content);