diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-10-21 16:01:47 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-25 20:33:19 +0100 |
commit | 12f085e538a1e3060fc5be3e21cefbb6d4c492b5 (patch) | |
tree | 895d4b9f158fc20d55bd8f4f76800434ed15dc0e /src/gui | |
parent | 1278995778a3ab576231c372969336a2f6621e02 (diff) |
Windows QPA: Add detection of dark mode
Read the dark mode setting and make it accessible
via native interface.
Add a command line option to set the support level.
Task-number: QTBUG-72028
Change-Id: I1e9fe296a6b1bda81512d003183038b866b67545
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 445ad6b835..1190bd1936 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -592,6 +592,21 @@ static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOME \list \li \c {altgr}, detect the key \c {AltGr} found on some keyboards as Qt::GroupSwitchModifier (since Qt 5.12). + \li \c {darkmode=[1|2]} controls how Qt responds to the activation + of the \e{Dark Mode for applications} introduced in Windows 10 + 1903 (since Qt 5.15). + + A value of 1 causes Qt to switch the window borders to black + when \e{Dark Mode for applications} is activated and no High + Contrast Theme is in use. This is intended for applications + that implement their own theming. + + A value of 2 will in addition cause the Windows Vista style to + be deactivated and switch to the Windows style using a + simplified palette in dark mode. This is currently + experimental pending the introduction of new style that + properly adapts to dark mode. + \li \c {dialogs=[xp|none]}, \c xp uses XP-style native dialogs and \c none disables them. |