diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h index 96ae6197b40..a89fb1e5bd1 100644 --- a/src/plugins/platforms/windows/qwindowstheme.h +++ b/src/plugins/platforms/windows/qwindowstheme.h @@ -33,7 +33,6 @@ public: Qt::ColorScheme colorScheme() const override; void requestColorScheme(Qt::ColorScheme scheme) override; - Qt::ColorScheme requestedColorScheme() const { return s_colorSchemeOverride; } static void handleSettingsChanged(); diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index ee0b88ba54b..acfff647518 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -855,12 +855,6 @@ static inline bool shouldApplyDarkFrame(const QWindow *w) if (!QWindowsIntegration::instance()->darkModeHandling().testFlag(QWindowsApplication::DarkModeWindowFrames)) return false; - // the application explicitly overrides the color scheme - if (const auto requestedColorScheme = QWindowsTheme::instance()->requestedColorScheme(); - requestedColorScheme != Qt::ColorScheme::Unknown) { - return requestedColorScheme == Qt::ColorScheme::Dark; - } - // if the application supports a dark border, and the palette is dark (window background color // is darker than the text), then turn dark-border support on, otherwise use a light border. auto *dWindow = QWindowPrivate::get(const_cast(w));