From cee94658d686d22d28a1fef849eb916e494e67e2 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 2 May 2024 21:45:16 +0200 Subject: [PATCH] Windows: handle theme changes synchronously when settings change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The handleSettingsChange handler is usually already executed through the event loop. And if it is called directly e.g. when changing settings programmatically, then all side effects of the change should be in effect immediately. Task-number: QTBUG-124490 Change-Id: I243772860b1137ef9fe712c4b0d1c88593d2bdb4 Reviewed-by: Tor Arne Vestbø Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowstheme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp index a2224b1eac..e8a324aedb 100644 --- a/src/plugins/platforms/windows/qwindowstheme.cpp +++ b/src/plugins/platforms/windows/qwindowstheme.cpp @@ -561,7 +561,7 @@ void QWindowsTheme::handleSettingsChanged() integration->updateApplicationBadge(); if (integration->darkModeHandling().testFlag(QWindowsApplication::DarkModeStyle)) { QWindowsTheme::instance()->refresh(); - QWindowSystemInterface::handleThemeChange(); + QWindowSystemInterface::handleThemeChange(); } if (colorSchemeChanged) { for (QWindowsWindow *w : std::as_const(QWindowsContext::instance()->windows()))