aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp14
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index 6c6a0e3e..1c19bbd3 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -400,6 +400,10 @@ static const QRgb hintTextColorLight = 0x60000000;
static const QRgb hintTextColorDark = 0x4CFFFFFF;
static const QRgb dividerColorLight = 0x1E000000;
static const QRgb dividerColorDark = 0x1EFFFFFF;
+static const QRgb iconColorLight = 0x89000000;
+static const QRgb iconColorDark = 0xFFFFFFFF;
+static const QRgb iconDisabledColorLight = 0x42000000;
+static const QRgb iconDisabledColorDark = 0x4CFFFFFF;
static const QRgb raisedButtonColorLight = 0xFFD6D7D7;
static const QRgb raisedButtonColorDark = 0x3FCCCCCC;
static const QRgb raisedButtonDisabledColorLight = dividerColorLight;
@@ -863,6 +867,16 @@ QColor QQuickMaterialStyle::dividerColor() const
return QColor::fromRgba(m_theme == Light ? dividerColorLight : dividerColorDark);
}
+QColor QQuickMaterialStyle::iconColor() const
+{
+ return QColor::fromRgba(m_theme == Light ? iconColorLight : iconColorDark);
+}
+
+QColor QQuickMaterialStyle::iconDisabledColor() const
+{
+ return QColor::fromRgba(m_theme == Light ? iconDisabledColorLight : iconDisabledColorDark);
+}
+
QColor QQuickMaterialStyle::buttonColor(bool highlighted, bool pressed, bool hover) const
{
Shade shade = pressed ? (m_theme == Light ? Shade700 : Shade100)
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index 6a841803..af5638f1 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -74,6 +74,8 @@ class QQuickMaterialStyle : public QQuickStyleAttached
Q_PROPERTY(QColor textSelectionColor READ textSelectionColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor dropShadowColor READ dropShadowColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor dividerColor READ dividerColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor iconColor READ iconColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor iconDisabledColor READ iconDisabledColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor buttonColor READ buttonColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor buttonHoverColor READ buttonHoverColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor buttonPressColor READ buttonPressColor NOTIFY paletteChanged FINAL)
@@ -201,6 +203,8 @@ public:
QColor textSelectionColor() const;
QColor dropShadowColor() const;
QColor dividerColor() const;
+ QColor iconColor() const;
+ QColor iconDisabledColor() const;
QColor buttonColor() const;
QColor buttonHoverColor() const;
QColor buttonPressColor() const;