diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-02-09 14:16:05 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-02-13 17:19:23 +0100 |
commit | 32749c913b32e89e2027227233794f2296166cc6 (patch) | |
tree | 0daec9a562b3a1f5bc59a0a9cc556b193a0f8593 /src/plugins/styles | |
parent | 0c6aa4c8c2f05e9172a0f1f5852277a01e54c7c2 (diff) |
Rename Qt::Appearance to 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'.
Pick-to: 6.5
Change-Id: I8ceaf4138ecadff5ccd962480e8e5beb39b556ec
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/styles')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 2 | ||||
-rw-r--r-- | src/plugins/styles/windowsvista/qwindowsvistastyle.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index fa34c4cd58..4e7b131e84 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -160,7 +160,7 @@ const int pushButtonBevelRectOffsets[3] = { QVector<QPointer<QObject> > QMacStylePrivate::scrollBars; -bool isDarkMode() { return QGuiApplicationPrivate::platformTheme()->appearance() == Qt::Appearance::Dark; } +bool isDarkMode() { return QGuiApplicationPrivate::platformTheme()->colorScheme() == Qt::ColorScheme::Dark; } // Title bar gradient colors for Lion were determined by inspecting PSDs exported // using CoreUI's CoreThemeDocument; there is no public API to retrieve them diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp index f884afc5b4..e90d1c0925 100644 --- a/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsvistastyle.cpp @@ -4781,7 +4781,7 @@ void QWindowsVistaStyle::polish(QPalette &pal) { Q_D(QWindowsVistaStyle); - if (qApp->styleHints()->appearance() == Qt::Appearance::Dark) { + if (qApp->styleHints()->colorScheme() == Qt::ColorScheme::Dark) { // System runs in dark mode, but the Vista style cannot use a dark palette. // Overwrite with the light system palette. using QWindowsApplication = QNativeInterface::Private::QWindowsApplication; @@ -4817,7 +4817,7 @@ void QWindowsVistaStyle::polish(QPalette &pal) void QWindowsVistaStyle::polish(QApplication *app) { // Override windows theme palettes to light - if (qApp->styleHints()->appearance() == Qt::Appearance::Dark) { + if (qApp->styleHints()->colorScheme() == Qt::ColorScheme::Dark) { static const char* themedWidgets[] = { "QToolButton", "QAbstractButton", |