summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qstylehints.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-02-09 13:46:06 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-02-09 18:55:37 +0100
commit92f5836fe8611d6f7a70efcc3b0dd5db262ba175 (patch)
tree851f183b106868f4b0bb901dab6fa7e78db55bc1 /src/gui/kernel/qstylehints.h
parent0f50145e433d2ac4ad2f4371ce627d2e0c2e0efd (diff)
Prepare for replacing Qt::Appearance with Qt::ColorScheme
Based on discussions in the 6.5 API review, where we concluded that 'appearance' is too general. Instead, we follow the CSS standard and use the term 'color scheme'. This patch is a first step, only introducing the new API, so that submodules can port over. The next step will be to remove the old API and transition the docs and platform themes. Pick-to: 6.5 Change-Id: I43cdb6bb1ccb49c535c06b1897821467fd83ca60 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/gui/kernel/qstylehints.h')
-rw-r--r--src/gui/kernel/qstylehints.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h
index 779bed67d8..cae5a64f85 100644
--- a/src/gui/kernel/qstylehints.h
+++ b/src/gui/kernel/qstylehints.h
@@ -53,6 +53,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject
FINAL)
Q_PROPERTY(int touchDoubleTapDistance READ touchDoubleTapDistance STORED false CONSTANT FINAL)
Q_PROPERTY(Qt::Appearance appearance READ appearance NOTIFY appearanceChanged FINAL)
+ Q_PROPERTY(Qt::ColorScheme colorScheme READ colorScheme NOTIFY colorSchemeChanged FINAL)
public:
void setMouseDoubleClickInterval(int mouseDoubleClickInterval);
@@ -94,6 +95,7 @@ public:
void setMouseQuickSelectionThreshold(int threshold);
int mouseQuickSelectionThreshold() const;
Qt::Appearance appearance() const;
+ Qt::ColorScheme colorScheme() const;
Q_SIGNALS:
void cursorFlashTimeChanged(int cursorFlashTime);
@@ -108,6 +110,7 @@ Q_SIGNALS:
void wheelScrollLinesChanged(int scrollLines);
void mouseQuickSelectionThresholdChanged(int threshold);
void appearanceChanged(Qt::Appearance appearance);
+ void colorSchemeChanged(Qt::ColorScheme colorScheme);
private:
friend class QGuiApplication;