aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Button.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-09-21 10:50:02 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-09-22 12:03:31 +0000
commit011339fb6059e8484033a8d0a3e26790d0fa2931 (patch)
treee06638be01201003e1fb651fb5c7b21584a82235 /src/imports/controls/Button.qml
parent4f78462e867925f1e5fd8c2a3411ebfcba0969db (diff)
Default: choose Button foreground from the palette
Task-number: QTBUG-63331 Change-Id: I413a1c0297ba4cd6040a6c2974b7eec352ca5857 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/Button.qml')
-rw-r--r--src/imports/controls/Button.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml
index 9cac6fd7..07f066b3 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -55,9 +55,9 @@ T.Button {
icon.width: 24
icon.height: 24
- icon.color: Color.transparent(checked || highlighted ? Default.textLightColor :
- visualFocus ? Default.focusColor : down ? Default.textDarkColor : Default.textColor,
- enabled || highlighted || checked ? 1 : 0.3)
+ icon.color: control.checked || control.highlighted ? control.palette.brightText :
+ control.visualFocus ? control.palette.highlight :
+ control.flat && !control.down ? control.palette.windowText : control.palette.buttonText
contentItem: IconLabel {
spacing: control.spacing
@@ -67,9 +67,9 @@ T.Button {
icon: control.icon
text: control.text
font: control.font
- color: Color.transparent(control.checked || control.highlighted ? Default.textLightColor :
- control.visualFocus ? Default.focusColor : control.down ? Default.textDarkColor : Default.textColor,
- enabled || control.highlighted || control.checked ? 1 : 0.3)
+ color: control.checked || control.highlighted ? control.palette.brightText :
+ control.visualFocus ? control.palette.highlight :
+ control.flat && !control.down ? control.palette.windowText : control.palette.buttonText
}
background: Rectangle {