summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-05 10:36:10 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-05 10:36:10 +0200
commitb8d7cb77a0fd8b7343cd2d3aee82368de4d0615e (patch)
treea24049491ace05dc761e96b5da6fab722aed0660 /framework
parentc93e0e95d1e216347058d7d0062b4ba28fa7c7bb (diff)
downloadkube-b8d7cb77a0fd8b7343cd2d3aee82368de4d0615e.tar.gz
kube-b8d7cb77a0fd8b7343cd2d3aee82368de4d0615e.zip
Maded Switch fit for keyboard navigation
Diffstat (limited to 'framework')
-rw-r--r--framework/qml/Switch.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/qml/Switch.qml b/framework/qml/Switch.qml
index ad24054c..6ed10ecd 100644
--- a/framework/qml/Switch.qml
+++ b/framework/qml/Switch.qml
@@ -9,6 +9,8 @@ T.Switch {
9 implicitWidth: indicator.width 9 implicitWidth: indicator.width
10 implicitHeight: indicator.height 10 implicitHeight: indicator.height
11 11
12 Keys.onReturnPressed: root.toggle()
13
12 indicator: Item { 14 indicator: Item {
13 height: Kube.Units.gridUnit 15 height: Kube.Units.gridUnit
14 width: Kube.Units.gridUnit * 2 16 width: Kube.Units.gridUnit * 2
@@ -26,8 +28,10 @@ T.Switch {
26 x: root.visualPosition * Kube.Units.gridUnit 28 x: root.visualPosition * Kube.Units.gridUnit
27 radius: 2 29 radius: 2
28 color: Kube.Colors.viewBackgroundColor 30 color: Kube.Colors.viewBackgroundColor
29 border.width: 1 31 border {
30 border.color: Kube.Colors.buttonColor 32 width: root.hovered || root.visualFocus ? 2 : 1
33 color: root.hovered || root.visualFocus ? Kube.Colors.highlightColor : Kube.Colors.buttonColor
34 }
31 } 35 }
32 } 36 }
33} 37}