diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-04-16 21:43:04 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-04-16 20:16:02 +0000 |
commit | e0b01d06836e23f576d104b573eb87313119f16f (patch) | |
tree | 2c5f4f40fdd90ebceb73cc1f43a5bd460e359163 /src/imports | |
parent | cd1fa3b72cf2a170216dbec55e580414dadb68d5 (diff) |
Add invokable Universal.color() method
Material has it also. It's useful for getting the actual color values.
Change-Id: I36de2e5802b3721179be95503b8b516d31682065
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/controls/universal/qquickuniversalstyle.cpp | 5 | ||||
-rw-r--r-- | src/imports/controls/universal/qquickuniversalstyle_p.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/imports/controls/universal/qquickuniversalstyle.cpp b/src/imports/controls/universal/qquickuniversalstyle.cpp index 53b473a4..f7e9b3ee 100644 --- a/src/imports/controls/universal/qquickuniversalstyle.cpp +++ b/src/imports/controls/universal/qquickuniversalstyle.cpp @@ -262,6 +262,11 @@ void QQuickUniversalStyle::resetAccent() inheritAccent(universal ? universal->m_accent : DefaultAccent); } +QColor QQuickUniversalStyle::color(Color color) const +{ + return qquickuniversal_accent_color(color); +} + QColor QQuickUniversalStyle::altHighColor() const { return systemColor(AltHigh); diff --git a/src/imports/controls/universal/qquickuniversalstyle_p.h b/src/imports/controls/universal/qquickuniversalstyle_p.h index 8cca44d5..31c96594 100644 --- a/src/imports/controls/universal/qquickuniversalstyle_p.h +++ b/src/imports/controls/universal/qquickuniversalstyle_p.h @@ -130,6 +130,8 @@ public: void propagateAccent(); void resetAccent(); + Q_INVOKABLE QColor color(Color color) const; + QColor altHighColor() const; QColor altLowColor() const; QColor altMediumColor() const; |