aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2026-01-21 12:37:05 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2026-01-22 11:10:44 +0000
commit09c70541c76659bcd8c49f05841b0e778c9ffd4c (patch)
tree84cefee180f55b76bf244b2c61ea2449f7167571
parent5d7f3c4411d575625737b659106bc5140f218501 (diff)
Windows style: merge the light system palette into the current palettev6.10.26.10.2
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 <oliver.eftevaag@qt.io>
-rw-r--r--src/quicknativestyle/qstyle/windows/qquickwindowsstyle.cpp4
1 files changed, 3 insertions, 1 deletions
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<QWindowsApplication *>(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()