From 6d4b3582adaf3cea23b0ef777a1bf3e7597fd8da Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Jul 2020 15:26:13 +0200 Subject: Windows QPA: Move dark mode handling to the new interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qguiapplication_p.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') 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 -- cgit v1.2.3