From 09c70541c76659bcd8c49f05841b0e778c9ffd4c Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 21 Jan 2026 12:37:05 +0100 Subject: Windows style: merge the light system palette into the current palette Amends af17d8437fe9d7fb7a98b43707e92e0252d9ffcf. We should not override palette entries that are explicitly set in the global palette, and only use the light theme colors for everything else. Use QPalette::resolve to merge the light system palette into the currently set application palette. Fixes: QTBUG-143547 Pick-to: dev 6.11 6.10 6.8 Change-Id: Iad3b9f66117e905636a801b8a01a84b8a3801758 Reviewed-by: Oliver Eftevaag --- src/quicknativestyle/qstyle/windows/qquickwindowsstyle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/quicknativestyle/qstyle/windows/qquickwindowsstyle.cpp b/src/quicknativestyle/qstyle/windows/qquickwindowsstyle.cpp index 5be34237f5..fc468c87a9 100644 --- a/src/quicknativestyle/qstyle/windows/qquickwindowsstyle.cpp +++ b/src/quicknativestyle/qstyle/windows/qquickwindowsstyle.cpp @@ -2295,7 +2295,9 @@ void QWindowsStyle::refreshPalette() if (auto nativeWindowsApp = dynamic_cast(QGuiApplicationPrivate::platformIntegration())) nativeWindowsApp->populateLightSystemPalette(pal); QQuickTheme::instance()->setPalette(QQuickTheme::System, pal); - QGuiApplication::setPalette(pal); + QPalette guiPalette = QGuiApplication::palette(); + guiPalette.resolve(pal); + QGuiApplication::setPalette(guiPalette); } void QWindowsStyle::polish() -- cgit v1.2.3