diff --git a/Telegram/SourceFiles/settings/sections/settings_chat.cpp b/Telegram/SourceFiles/settings/sections/settings_chat.cpp index 2cac29431a..c4c4cfe15a 100644 --- a/Telegram/SourceFiles/settings/sections/settings_chat.cpp +++ b/Telegram/SourceFiles/settings/sections/settings_chat.cpp @@ -99,11 +99,7 @@ const auto kSchemesList = Window::Theme::EmbeddedThemes(); constexpr auto kCustomColorButtonParts = 7; [[nodiscard]] bool IsSystemAccentColorSupported() { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - return true; -#else - return !Platform::IsWindows() || !Platform::IsWindows8OrGreater(); -#endif + return Window::Theme::SystemAccentColor().has_value(); } class ColorsPalette final { diff --git a/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp b/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp index 58ebea3240..48511057eb 100644 --- a/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp +++ b/Telegram/SourceFiles/window/themes/window_themes_embedded.cpp @@ -179,6 +179,11 @@ style::colorizer ColorizerFrom( } std::optional SystemAccentColor() { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + if (Platform::IsWindows() && !Platform::IsWindows8OrGreater()) { + return std::nullopt; + } +#endif // Qt < 6.0.0 #if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) constexpr auto kAccentRole = QPalette::ColorRole::Accent; #else