aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/imagine/RoundButton.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-10-04 17:20:48 +0200
committerMitch Curtis <mitch.curtis@qt.io>2017-10-06 13:01:04 +0000
commit5f91556c684ef502352391c2eb8faec73b4c0726 (patch)
treed1b00c94a843f726d42704e2763a79bf82bcbce8 /src/imports/controls/imagine/RoundButton.qml
parente795672e4279029bbae002d1a5c55a5a6316281e (diff)
Imagine: set icon properties as we do for Button
Change-Id: Iac93ca277883984ef99ffc34acade32f7b4ce434 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/imagine/RoundButton.qml')
-rw-r--r--src/imports/controls/imagine/RoundButton.qml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/imports/controls/imagine/RoundButton.qml b/src/imports/controls/imagine/RoundButton.qml
index e3ee269b..4f8a195e 100644
--- a/src/imports/controls/imagine/RoundButton.qml
+++ b/src/imports/controls/imagine/RoundButton.qml
@@ -55,6 +55,12 @@ T.RoundButton {
rightPadding: background ? background.rightPadding : 0
bottomPadding: background ? background.bottomPadding : 0
+ icon.width: 24
+ icon.height: 24
+ icon.color: control.enabled && control.flat && control.highlighted ? control.palette.highlight
+ : control.enabled && (control.down || control.checked || control.highlighted) && !control.flat
+ ? control.palette.brightText : control.flat ? control.palette.windowText : control.palette.buttonText
+
contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
@@ -63,7 +69,9 @@ T.RoundButton {
icon: control.icon
text: control.text
font: control.font
- color: control.palette.buttonText
+ color: control.enabled && control.flat && control.highlighted ? control.palette.highlight
+ : control.enabled && (control.down || control.checked || control.highlighted) && !control.flat
+ ? control.palette.brightText : control.flat ? control.palette.windowText : control.palette.buttonText
}
background: NinePatchImage {