diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-25 06:37:32 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-25 06:37:32 +0200 |
commit | c545ad147bf0faba6192ac947dbb018aca0154e2 (patch) | |
tree | 99eb506915f42440d86dbe40d93aeff66393a459 /framework/qml/ListDelegate.qml | |
parent | 83209b5ea692619278499d7ad3c087ed96ebbbf0 (diff) | |
download | kube-c545ad147bf0faba6192ac947dbb018aca0154e2.tar.gz kube-c545ad147bf0faba6192ac947dbb018aca0154e2.zip |
Use the highlighted property
Diffstat (limited to 'framework/qml/ListDelegate.qml')
-rw-r--r-- | framework/qml/ListDelegate.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/qml/ListDelegate.qml b/framework/qml/ListDelegate.qml index e3a8dafd..3db56ff3 100644 --- a/framework/qml/ListDelegate.qml +++ b/framework/qml/ListDelegate.qml | |||
@@ -26,11 +26,12 @@ T.ItemDelegate { | |||
26 | property variant currentData: model | 26 | property variant currentData: model |
27 | property alias color: background.color | 27 | property alias color: background.color |
28 | property alias border: background.border | 28 | property alias border: background.border |
29 | property color textColor: ListView.isCurrentItem ? Kube.Colors.highlightedTextColor : Kube.Colors.textColor | 29 | property color textColor: highlighted ? Kube.Colors.highlightedTextColor : Kube.Colors.textColor |
30 | 30 | ||
31 | height: Kube.Units.gridUnit * 3 | 31 | height: Kube.Units.gridUnit * 3 |
32 | width: root.ListView.view.width | 32 | width: root.ListView.view.width |
33 | hoverEnabled: true | 33 | hoverEnabled: true |
34 | highlighted: ListView.isCurrentItem | ||
34 | 35 | ||
35 | background: Rectangle { | 36 | background: Rectangle { |
36 | id: background | 37 | id: background |
@@ -39,7 +40,7 @@ T.ItemDelegate { | |||
39 | color: Kube.Colors.viewBackgroundColor | 40 | color: Kube.Colors.viewBackgroundColor |
40 | Rectangle { | 41 | Rectangle { |
41 | anchors.fill: parent | 42 | anchors.fill: parent |
42 | visible: root.ListView.isCurrentItem | 43 | visible: root.highlighted |
43 | color: Kube.Colors.highlightColor | 44 | color: Kube.Colors.highlightColor |
44 | } | 45 | } |
45 | Rectangle { | 46 | Rectangle { |