diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-24 15:26:13 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-25 21:59:37 +0200 |
commit | 6d4b3582adaf3cea23b0ef777a1bf3e7597fd8da (patch) | |
tree | e5ba098842acc19330caa11ac542f3752b0a5034 /src/gui/kernel/qguiapplication_p.h | |
parent | f06dfb60b96004971917a27559713314b7f60de6 (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/gui/kernel/qguiapplication_p.h')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 8080d7801d..ecb4a66fac 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -390,6 +390,13 @@ struct Q_GUI_EXPORT QWindowsApplication Q_DECLARE_FLAGS(TouchWindowTouchTypes, TouchWindowTouchType) + enum DarkModeHandlingFlag { + DarkModeWindowFrames = 0x1, + DarkModeStyle = 0x2 + }; + + Q_DECLARE_FLAGS(DarkModeHandling, DarkModeHandlingFlag) + virtual void setTouchWindowTouchType(TouchWindowTouchTypes type) = 0; virtual TouchWindowTouchTypes touchWindowTouchType() const = 0; @@ -400,6 +407,11 @@ struct Q_GUI_EXPORT QWindowsApplication virtual bool isWinTabEnabled() const = 0; virtual bool setWinTabEnabled(bool enabled) = 0; + + virtual bool isDarkMode() const = 0; + + virtual DarkModeHandling darkModeHandling() const = 0; + virtual void setDarkModeHandling(DarkModeHandling handling) = 0; }; #endif // Q_OS_WIN @@ -407,6 +419,7 @@ struct Q_GUI_EXPORT QWindowsApplication #if defined(Q_OS_WIN) Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes) +Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformInterface::Private::QWindowsApplication::DarkModeHandling) #endif QT_END_NAMESPACE |