aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-03-22 11:15:35 +0100
committerMitch Curtis <mitch.curtis@theqtcompany.com>2016-03-23 11:54:44 +0000
commite2ec29c6d40a683cd5b05d6ed4f163d81864aa60 (patch)
tree1d4f310eab5e6bac830125b077fd2958a940a8d7 /src
parent292550c310a977a9e5da2f14773a07e4dcddce0d (diff)
Update Default style Switch to match new design specs
Change-Id: I3f566f138b3e26e75ad3e7ab36078ee04e5d627c Task-number: QTBUG-50993 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/controls/Switch.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index 01f561a1..b06d91fd 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -62,9 +62,9 @@ T.Switch {
width: 56
height: 16
radius: 8
- border.width: 1
- color: control.checked ? "#353637" : "transparent"
- border.color: control.checked ? "transparent" : "#353637"
+ color: control.checked ? (control.activeFocus ? "#0066ff" : "#353637") : "transparent"
+ border.width: control.activeFocus ? 2 : 1
+ border.color: control.checked ? "transparent" : (control.activeFocus ? "#0066ff" : "#353637")
}
Rectangle {
@@ -73,9 +73,9 @@ T.Switch {
width: 28
height: 28
radius: 16
- color: control.pressed ? "#e4e4e4" : "#f6f6f6"
- border.width: 1
- border.color: control.pressed ? "#26282a" : "#353637"
+ color: control.pressed ? (control.activeFocus ? "#cce0ff" : "#e4e4e4") : (control.activeFocus ? "#f0f6ff" : "#f6f6f6")
+ border.width: control.activeFocus ? 2 : 1
+ border.color: control.activeFocus ? "#0066ff" : (control.pressed ? "#26282a" : "#353637")
Behavior on x {
enabled: !control.pressed