summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication_p.h
diff options
context:
space:
mode:
authorSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2023-06-14 10:12:35 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2023-06-21 22:13:49 +0000
commit39882a1354cb06d2b0b0a0d5b41a168041df0476 (patch)
treeee5a2a97da9ec2b87d3428bc978dd1aea53c90aa /src/gui/kernel/qguiapplication_p.h
parentfc3ee08737ab53b8ad033e50b3b14fc8bba4bca1 (diff)
Set color scheme after handling theme change in windows
Setting color scheme before handling theme change provides incorrect palette color when user switches from light to dark or dark to light. This is visible when using Fusion style (or other style that supports dark mode) in Windows. The change has been made as part of patchset 787038bb1d282b4d6c5c040d8e902ccac9befb41. It also has to be noted that handling palette changes to make further changes to the palette (or the style sheet), is less likely than Handling the colorScheme change signal and in this sense, this patch set can also be considered as an improvement. This patchset reverts that change and updates color scheme after palette change in the application. [ChangeLog][QtGui][ColorScheme] Update colorScheme property after palette change. Fixes: QTBUG-112653 Pick-to: 6.5 6.6 Change-Id: I71bc413c56663fefdf9fe5871bbb19b7e6c3d9ff Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r--src/gui/kernel/qguiapplication_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index ec63876058..272ca3f8e2 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -320,6 +320,8 @@ public:
static void updatePalette();
+ static Qt::ColorScheme colorScheme();
+
protected:
virtual void handleThemeChanged();
@@ -336,8 +338,6 @@ private:
friend class QDragManager;
- static Qt::ColorScheme colorScheme();
-
static QGuiApplicationPrivate *self;
static int m_fakeMouseSourcePointId;
#ifdef Q_OS_WIN