summaryrefslogtreecommitdiffstats
path: root/framework/qml/TreeView.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/TreeView.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/TreeView.qml')
-rw-r--r--framework/qml/TreeView.qml18
1 files changed, 3 insertions, 15 deletions
diff --git a/framework/qml/TreeView.qml b/framework/qml/TreeView.qml
index ab3367bb..6063d8c1 100644
--- a/framework/qml/TreeView.qml
+++ b/framework/qml/TreeView.qml
@@ -169,23 +169,11 @@ FocusScope {
169 width: parent.parent.parent ? parent.parent.parent.width : 0 169 width: parent.parent.parent ? parent.parent.parent.width : 0
170 focus: false 170 focus: false
171 hoverEnabled: true 171 hoverEnabled: true
172 Rectangle { 172 Kube.DelegateBackground {
173 anchors.fill: parent 173 anchors.fill: parent
174
175 color: Kube.Colors.textColor 174 color: Kube.Colors.textColor
176 175 focused: styleData.selected || delegateRoot.hovered
177 Rectangle { 176 selected: isActive
178 anchors.fill: parent
179 color: Kube.Colors.highlightColor
180 visible: isActive
181 }
182 Rectangle {
183 anchors.fill: parent
184 border.width: 2
185 border.color: Kube.Colors.focusedButtonColor
186 color: "transparent"
187 visible: styleData.selected || delegateRoot.hovered
188 }
189 } 177 }
190 } 178 }
191 179