aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialstyle.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-21 17:03:55 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-22 11:17:13 +0000
commite7d03ea7aae172bb2ef5e89b89156f8ea143eca1 (patch)
tree3dcb330fdd91dcfe6b63b85a059de0d95c250bc6 /src/imports/controls/material/qquickmaterialstyle.cpp
parentf7c0efb42bd7f8b331525b42ec16536c1b4862f9 (diff)
Move isDarkTheme() to QQuickStylePrivate
QQuickStyleAttached is being generalized to a recursive attached object type that can be used for palettes too, which are planned to be used for the upcoming image-based style. Change-Id: I4c1d25624ee11bb0ec6cd5ee2656c36e622e2139 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/qquickmaterialstyle.cpp')
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index 5685b197..94dfa80d 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -419,12 +419,10 @@ static const QRgb rippleColorDark = 0x20FFFFFF;
static const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC;
static const QRgb spinBoxDisabledIconColorDark = 0xFF666666;
-extern bool qt_is_dark_system_theme();
-
static QQuickMaterialStyle::Theme effectiveTheme(QQuickMaterialStyle::Theme theme)
{
if (theme == QQuickMaterialStyle::System)
- theme = qt_is_dark_system_theme() ? QQuickMaterialStyle::Dark : QQuickMaterialStyle::Light;
+ theme = QQuickStylePrivate::isDarkSystemTheme() ? QQuickMaterialStyle::Dark : QQuickMaterialStyle::Light;
return theme;
}
@@ -463,7 +461,7 @@ QQuickMaterialStyle::Theme QQuickMaterialStyle::theme() const
void QQuickMaterialStyle::setTheme(Theme theme)
{
if (theme == System)
- theme = qt_is_dark_system_theme() ? Dark : Light;
+ theme = QQuickStylePrivate::isDarkSystemTheme() ? Dark : Light;
m_explicitTheme = true;
if (m_theme == theme)