From 699958ee8d39176da230fa6193cd7c91e08b5165 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 26 Jul 2017 13:56:21 -0600 Subject: Standard ListDelegate onClicked handler --- framework/qml/ListDelegate.qml | 5 +++++ framework/qml/MailListView.qml | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'framework') diff --git a/framework/qml/ListDelegate.qml b/framework/qml/ListDelegate.qml index fd654e4c..6d6a5d08 100644 --- a/framework/qml/ListDelegate.qml +++ b/framework/qml/ListDelegate.qml @@ -33,6 +33,11 @@ T.ItemDelegate { hoverEnabled: true highlighted: ListView.isCurrentItem + onClicked: { + ListView.view.currentIndex = index + ListView.view.forceActiveFocus() + } + background: Kube.DelegateBackground { id: background border.color: Kube.Colors.buttonColor diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 9de30313..d4e0672b 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml @@ -107,8 +107,6 @@ FocusScope { //Required for D&D property var mail: model.mail - onClicked: ListView.view.currentIndex = index - width: scrollbar.visible ? listView.width - scrollbar.width : listView.width height: Kube.Units.gridUnit * 5 -- cgit v1.2.3