summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstheme.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-24 15:26:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-25 21:59:37 +0200
commit6d4b3582adaf3cea23b0ef777a1bf3e7597fd8da (patch)
treee5ba098842acc19330caa11ac542f3752b0a5034 /src/plugins/platforms/windows/qwindowstheme.cpp
parentf06dfb60b96004971917a27559713314b7f60de6 (diff)
Windows QPA: Move dark mode handling to the new interface
Move options to new interface, making them settable from code on this occasion. Task-number: QTBUG-83252 Change-Id: Idd80667c502a8cde5d7c66d7e597ea34c22738e7 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowstheme.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
index 130fac4736..ea74d8e372 100644
--- a/src/plugins/platforms/windows/qwindowstheme.cpp
+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
@@ -533,7 +533,7 @@ void QWindowsTheme::refreshPalettes()
return;
const bool light =
!QWindowsContext::isDarkMode()
- || (QWindowsIntegration::instance()->options() & QWindowsIntegration::DarkModeStyle) == 0;
+ || !QWindowsIntegration::instance()->darkModeHandling().testFlag(QWindowsApplication::DarkModeStyle);
m_palettes[SystemPalette] = new QPalette(systemPalette(light));
m_palettes[ToolTipPalette] = new QPalette(toolTipPalette(*m_palettes[SystemPalette], light));
m_palettes[MenuPalette] = new QPalette(menuPalette(*m_palettes[SystemPalette], light));