diff --git a/common/themes/theme_manager.cpp b/common/themes/theme_manager.cpp index e39554be..094000c2 100644 --- a/common/themes/theme_manager.cpp +++ b/common/themes/theme_manager.cpp @@ -21,8 +21,6 @@ ThemeManager &ThemeManager::instance() void ThemeManager::initialize() { - // QStyleHints::colorScheme is only 6.5+ -#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) auto *styleHints = qGuiApp->styleHints(); auto colorScheme = styleHints->colorScheme(); @@ -35,15 +33,6 @@ void ThemeManager::initialize() applyColorScheme(colorScheme); connect(styleHints, &QStyleHints::colorSchemeChanged, this, applyColorScheme, Qt::QueuedConnection); -#else - auto applyPalette = [this](const QPalette &palette) { - setTheme(palette.color(QPalette::Window).lightness() < 128 ? ThemeId::Dark : ThemeId::Light); - }; - - applyPalette(qGuiApp->palette()); - - connect(qGuiApp, &QGuiApplication::paletteChanged, this, applyPalette, Qt::QueuedConnection); -#endif } void ThemeManager::setTheme(ThemeId themeId)