From eefb9823e16cd2622ecf72db327c324c75fb613f Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 24 Feb 2022 18:03:54 +0300 Subject: [PATCH] Don't apply theme accent color to the settings icons. --- .../SourceFiles/window/themes/window_themes_embedded.cpp | 8 ++++++++ Telegram/SourceFiles/window/window.style | 3 ++- Telegram/SourceFiles/window/window_main_menu.cpp | 7 ++++--- Telegram/lib_ui | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp b/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp index 98ff70ac03..45cdbaf543 100644 --- a/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp +++ b/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp @@ -67,6 +67,14 @@ const auto kColorizeIgnoredKeys = base::flat_set{ { qstr("mediaviewFileYellowCornerFg"), qstr("mediaviewFileGreenCornerFg"), qstr("mediaviewFileBlueCornerFg"), + qstr("settingsIconBg1"), + qstr("settingsIconBg2"), + qstr("settingsIconBg3"), + qstr("settingsIconBg4"), + qstr("settingsIconBg5"), + qstr("settingsIconBg6"), + qstr("settingsIconBg8"), + qstr("settingsIconBgArchive"), } }; style::colorizer::Color cColor(std::string_view hex) { diff --git a/Telegram/SourceFiles/window/window.style b/Telegram/SourceFiles/window/window.style index dd31a5dcf2..48d0383b25 100644 --- a/Telegram/SourceFiles/window/window.style +++ b/Telegram/SourceFiles/window/window.style @@ -115,6 +115,7 @@ mainMenuCoverNameLeft: 26px; mainMenuCoverNameTop: 84px; mainMenuCoverStatusLeft: 24px; mainMenuCoverStatusTop: 103px; +mainMenuPhoneFont: font(12px); mainMenuSkip: 6px; mainMenuFooterHeightMin: 80px; mainMenu: Menu(defaultMenu) { @@ -142,7 +143,7 @@ mainMenuAddAccountButton: SettingsButton(mainMenuButton) { } mainMenuShadow: icon {{ "menu_shadow", windowShadowFg }}; -mainMenuAddAccount: icon {{ "settings/add", settingsIconFg }}; +mainMenuAddAccount: icon {{ "settings/add", windowFgActive }}; mainMenuAccountSize: 26px; mainMenuAccountLine: 2px; mainMenuBadgeFont: font(11px bold); diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index 0dc25e418c..ef6ccfdc83 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -274,7 +274,7 @@ void AddUnreadBadge( const auto diameter = full - 2 * shift; const auto rect = QRectF(shift, shift, diameter, diameter); auto hq = PainterHighQualityEnabler(p); - auto pen = st::settingsIconBg4->p; // The same as '+' in add. + auto pen = st::windowBgActive->p; // The same as '+' in add. pen.setWidthF(line); p.setPen(pen); p.setBrush(Qt::NoBrush); @@ -901,8 +901,9 @@ not_null*> MainMenu::setupAddAccount( st::mainMenuAddAccountButton, { &st::mainMenuAddAccount, - kIconLightBlue, + 0, IconType::Round, + &st::windowBgActive })))->setDuration(0); const auto button = result->entity(); @@ -1124,7 +1125,7 @@ void MainMenu::paintEvent(QPaintEvent *e) { st::mainMenuCoverNameTop, widthText, width()); - p.setFont(st::normalFont); + p.setFont(st::mainMenuPhoneFont); p.setPen(st::windowSubTextFg); p.drawTextLeft( st::mainMenuCoverStatusLeft, diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 6316443b27..34a42aa8c3 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 6316443b27cffbf0205e07edc0616d370044893c +Subproject commit 34a42aa8c3ea8c00cba5ced73e3bb6a84938cd92