From c545ad147bf0faba6192ac947dbb018aca0154e2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 25 Jul 2017 06:37:32 +0200 Subject: Use the highlighted property --- framework/qml/ListDelegate.qml | 5 +++-- framework/qml/MailListView.qml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'framework/qml') 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 { property variant currentData: model property alias color: background.color property alias border: background.border - property color textColor: ListView.isCurrentItem ? Kube.Colors.highlightedTextColor : Kube.Colors.textColor + property color textColor: highlighted ? Kube.Colors.highlightedTextColor : Kube.Colors.textColor height: Kube.Units.gridUnit * 3 width: root.ListView.view.width hoverEnabled: true + highlighted: ListView.isCurrentItem background: Rectangle { id: background @@ -39,7 +40,7 @@ T.ItemDelegate { color: Kube.Colors.viewBackgroundColor Rectangle { anchors.fill: parent - visible: root.ListView.isCurrentItem + visible: root.highlighted color: Kube.Colors.highlightColor } Rectangle { diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index efc86a77..550880ed 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml @@ -147,7 +147,7 @@ FocusScope { fill: parent margins: Kube.Units.smallSpacing } - property color unreadColor: (model.unread && !delegateRoot.ListView.isCurrentItem) ? Kube.Colors.highlightColor : delegateRoot.textColor + property color unreadColor: (model.unread && !delegateRoot.highlighted) ? Kube.Colors.highlightColor : delegateRoot.textColor Column { anchors { -- cgit v1.2.3