diff --git a/src/core/framelessmanager.cpp b/src/core/framelessmanager.cpp index a61b3aa..cd49c14 100644 --- a/src/core/framelessmanager.cpp +++ b/src/core/framelessmanager.cpp @@ -355,8 +355,8 @@ void FramelessManagerPrivate::initialize() QStyleHints * const styleHints = QGuiApplication::styleHints(); Q_ASSERT(styleHints); if (styleHints) { - connect(styleHints, &QStyleHints::appearanceChanged, this, [this](const Qt::Appearance appearance){ - Q_UNUSED(appearance); + connect(styleHints, &QStyleHints::colorSchemeChanged, this, [this](const Qt::ColorScheme colorScheme){ + Q_UNUSED(colorScheme); notifySystemThemeHasChangedOrNot(); }); } diff --git a/src/core/utils.cpp b/src/core/utils.cpp index 6ae3aff..35316bc 100644 --- a/src/core/utils.cpp +++ b/src/core/utils.cpp @@ -282,7 +282,7 @@ QColor Utils::calculateSystemButtonBackgroundColor(const SystemButtonType button bool Utils::shouldAppsUseDarkMode() { #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) - return (QGuiApplication::styleHints()->appearance() == Qt::Appearance::Dark); + return (QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark); #elif ((QT_VERSION >= QT_VERSION_CHECK(6, 2, 1)) && !defined(FRAMELESSHELPER_CORE_NO_PRIVATE)) if (const QPlatformTheme * const theme = QGuiApplicationPrivate::platformTheme()) { return (theme->appearance() == QPlatformTheme::Appearance::Dark);