diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-05 10:24:36 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-05 10:24:36 +0200 |
commit | 6f6e0e6e765d9e7a6fd0f5b9c206d85e7ffcd2e0 (patch) | |
tree | 35dbdbad52c009bd29a5ecea5b100340d530b6b2 /framework | |
parent | c9a032e54a6fea705c6a4c604576da0f6ef551a4 (diff) | |
download | kube-6f6e0e6e765d9e7a6fd0f5b9c206d85e7ffcd2e0.tar.gz kube-6f6e0e6e765d9e7a6fd0f5b9c206d85e7ffcd2e0.zip |
A checkbox fit for keyboard navigation
Diffstat (limited to 'framework')
-rw-r--r-- | framework/qml/CheckBox.qml | 10 |
1 files changed, 10 insertions, 0 deletions
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 { | |||
26 | implicitWidth: indicator.width | 26 | implicitWidth: indicator.width |
27 | implicitHeight: indicator.width | 27 | implicitHeight: indicator.width |
28 | 28 | ||
29 | Keys.onReturnPressed: root.toggle() | ||
30 | |||
29 | indicator: Rectangle { | 31 | indicator: Rectangle { |
30 | width: Kube.Units.gridUnit | 32 | width: Kube.Units.gridUnit |
31 | height: Kube.Units.gridUnit | 33 | height: Kube.Units.gridUnit |
@@ -34,6 +36,14 @@ T.CheckBox { | |||
34 | border.width: 1 | 36 | border.width: 1 |
35 | border.color: Kube.Colors.buttonColor | 37 | border.color: Kube.Colors.buttonColor |
36 | 38 | ||
39 | Rectangle { | ||
40 | id: highlight | ||
41 | anchors.fill: parent | ||
42 | visible: root.hovered || root.visualFocus | ||
43 | color: Kube.Colors.highlightColor | ||
44 | opacity: 0.4 | ||
45 | } | ||
46 | |||
37 | Kube.Icon { | 47 | Kube.Icon { |
38 | anchors.centerIn: parent | 48 | anchors.centerIn: parent |
39 | height: Kube.Units.gridUnit | 49 | height: Kube.Units.gridUnit |