aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-04-16 17:44:04 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-18 09:48:16 +0000
commita5a156f90718ca7982bf826a3d533564cfaedf12 (patch)
treec4ff9be80d54ae97f19c0eeba75dfc8cc5b1d3d9 /src/imports
parentbf52dcb2e7284d774f1bc011b2a4c51a51027b10 (diff)
Material: make highlighted buttons respect explicitly set foreground
Highlighted buttons are special and don't automatically inherit the foreground color from the parent, but this change makes it possible to change the color by setting it explicitly on a highlighted button. Change-Id: I2e2f90ca001cdfffb47e5cf29266715243d7dd18 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index c7b68667..3213da12 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -776,6 +776,8 @@ QColor QQuickMaterialStyle::primaryTextColor() const
QColor QQuickMaterialStyle::primaryHighlightedTextColor() const
{
+ if (m_explicitForeground)
+ return primaryTextColor();
return QColor::fromRgba(primaryTextColorDark);
}