From 6f6e0e6e765d9e7a6fd0f5b9c206d85e7ffcd2e0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 5 Jul 2018 10:24:36 +0200 Subject: A checkbox fit for keyboard navigation --- framework/qml/CheckBox.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/framework/qml/CheckBox.qml b/framework/qml/CheckBox.qml index ca76c06d..17654536 100644 --- a/framework/qml/CheckBox.qml +++ b/framework/qml/CheckBox.qml @@ -26,6 +26,8 @@ T.CheckBox { implicitWidth: indicator.width implicitHeight: indicator.width + Keys.onReturnPressed: root.toggle() + indicator: Rectangle { width: Kube.Units.gridUnit height: Kube.Units.gridUnit @@ -34,6 +36,14 @@ T.CheckBox { border.width: 1 border.color: Kube.Colors.buttonColor + Rectangle { + id: highlight + anchors.fill: parent + visible: root.hovered || root.visualFocus + color: Kube.Colors.highlightColor + opacity: 0.4 + } + Kube.Icon { anchors.centerIn: parent height: Kube.Units.gridUnit -- cgit v1.2.3