aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/RoundButton.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-09-21 14:53:07 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-09-22 13:46:05 +0000
commit2adc10bbafb85e6467f9e22b4265a9889dcb649d (patch)
treeb54974d5b453a2c3594fcf41fca7b3eaa658b674 /src/imports/controls/RoundButton.qml
parent88e5a660a9b9084e28d0daaff4d31570747933c4 (diff)
Default: choose RoundButton foreground from the palette
Change-Id: Ic596a7c237392e1a54591ac82b0b78ac806acf16 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/RoundButton.qml')
-rw-r--r--src/imports/controls/RoundButton.qml14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/imports/controls/RoundButton.qml b/src/imports/controls/RoundButton.qml
index 723a14e0..11e8cf27 100644
--- a/src/imports/controls/RoundButton.qml
+++ b/src/imports/controls/RoundButton.qml
@@ -53,10 +53,9 @@ T.RoundButton {
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
@@ -66,10 +65,9 @@ T.RoundButton {
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 {