aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Button.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-04-26 12:42:10 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-26 13:31:18 +0000
commit345fb099aa08c72d380fed3330cc8b9d088a3cb4 (patch)
tree4cf28ead358bc333a27e6b794ca439ad27938289 /src/imports/controls/Button.qml
parent67f3da65d7d11af025a9bdd54d08ca0bf764c3ce (diff)
Control: rename activeKeyFocus to visualFocus
This is a bit more flexible, because the name is not strictly coupled with key focus. We can even add a (re)setter later if we want. This change only renames the property. Change-Id: I6707e44040f584480a8712df1af0915ae2829d57 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/Button.qml')
-rw-r--r--src/imports/controls/Button.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml
index c68fc1e8..d9ca2910 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -55,7 +55,7 @@ T.Button {
text: control.text
font: control.font
opacity: enabled || highlighted ? 1 : 0.3
- color: control.checked || control.highlighted ? "#ffffff" : (control.activeKeyFocus ? "#0066ff" : (control.down ? "#26282a" : "#353637"))
+ color: control.checked || control.highlighted ? "#ffffff" : (control.visualFocus ? "#0066ff" : (control.down ? "#26282a" : "#353637"))
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
@@ -68,10 +68,10 @@ T.Button {
implicitHeight: 40
opacity: enabled ? 1 : (control.checked ? 0.2 : 0.3)
color: control.checked || control.highlighted ?
- (control.activeKeyFocus ? (control.down ? "#599bff" : "#0066ff") : (control.down ? "#585a5c" : "#353637")) :
- (control.activeKeyFocus ? (control.down ? "#cce0ff" : "#f0f6ff") : (control.down ? "#d6d6d6" : "#f6f6f6"))
- border.color: control.activeKeyFocus ? "#0066ff" : (control.down ? "#26282a" : "#353637")
- border.width: control.checked || control.highlighted ? 0 : (control.activeKeyFocus ? 2 : 1)
+ (control.visualFocus ? (control.down ? "#599bff" : "#0066ff") : (control.down ? "#585a5c" : "#353637")) :
+ (control.visualFocus ? (control.down ? "#cce0ff" : "#f0f6ff") : (control.down ? "#d6d6d6" : "#f6f6f6"))
+ border.color: control.visualFocus ? "#0066ff" : (control.down ? "#26282a" : "#353637")
+ border.width: control.checked || control.highlighted ? 0 : (control.visualFocus ? 2 : 1)
}
//! [background]
}