From e2ec29c6d40a683cd5b05d6ed4f163d81864aa60 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 22 Mar 2016 11:15:35 +0100 Subject: Update Default style Switch to match new design specs Change-Id: I3f566f138b3e26e75ad3e7ab36078ee04e5d627c Task-number: QTBUG-50993 Reviewed-by: J-P Nurmi --- src/imports/controls/Switch.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/imports/controls/Switch.qml') 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 -- cgit v1.2.3