From b8d7cb77a0fd8b7343cd2d3aee82368de4d0615e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 5 Jul 2018 10:36:10 +0200 Subject: Maded Switch fit for keyboard navigation --- framework/qml/Switch.qml | 8 ++++++-- 1 file 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 { implicitWidth: indicator.width implicitHeight: indicator.height + Keys.onReturnPressed: root.toggle() + indicator: Item { height: Kube.Units.gridUnit width: Kube.Units.gridUnit * 2 @@ -26,8 +28,10 @@ T.Switch { x: root.visualPosition * Kube.Units.gridUnit radius: 2 color: Kube.Colors.viewBackgroundColor - border.width: 1 - border.color: Kube.Colors.buttonColor + border { + width: root.hovered || root.visualFocus ? 2 : 1 + color: root.hovered || root.visualFocus ? Kube.Colors.highlightColor : Kube.Colors.buttonColor + } } } } -- cgit v1.2.3