summaryrefslogtreecommitdiffstats
path: root/framework/qml/ListDelegate.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-26 12:34:08 -0600
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-26 12:34:08 -0600
commit5512fab518bc47ac1d1a2d4d2b9e3873a5a387b7 (patch)
tree30d8e766ad93fcd6362939b154aa7fb5dc2dba01 /framework/qml/ListDelegate.qml
parent901068806128313ea45c9441f54ff87d0d679e7c (diff)
downloadkube-5512fab518bc47ac1d1a2d4d2b9e3873a5a387b7.tar.gz
kube-5512fab518bc47ac1d1a2d4d2b9e3873a5a387b7.zip
Single background element to handle focus vs selected.
And we're experimenting with only using a border when selected, and highlight otherwise.
Diffstat (limited to 'framework/qml/ListDelegate.qml')
-rw-r--r--framework/qml/ListDelegate.qml16
1 files changed, 3 insertions, 13 deletions
diff --git a/framework/qml/ListDelegate.qml b/framework/qml/ListDelegate.qml
index 3db56ff3..fd654e4c 100644
--- a/framework/qml/ListDelegate.qml
+++ b/framework/qml/ListDelegate.qml
@@ -33,22 +33,12 @@ T.ItemDelegate {
33 hoverEnabled: true 33 hoverEnabled: true
34 highlighted: ListView.isCurrentItem 34 highlighted: ListView.isCurrentItem
35 35
36 background: Rectangle { 36 background: Kube.DelegateBackground {
37 id: background 37 id: background
38 border.color: Kube.Colors.buttonColor 38 border.color: Kube.Colors.buttonColor
39 border.width: 1 39 border.width: 1
40 color: Kube.Colors.viewBackgroundColor 40 color: Kube.Colors.viewBackgroundColor
41 Rectangle { 41 focused: root.hovered || root.activeFocus
42 anchors.fill: parent 42 selected: root.highlighted
43 visible: root.highlighted
44 color: Kube.Colors.highlightColor
45 }
46 Rectangle {
47 anchors.fill: parent
48 visible: root.hovered || root.activeFocus
49 border.color: Kube.Colors.focusedButtonColor
50 border.width: 2
51 color: "transparent"
52 }
53 } 43 }
54} 44}