diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-12-16 14:52:58 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2015-12-16 14:52:58 +0100 |
commit | aff0fc08492d473f1759b2239376fd2bc0f23a5a (patch) | |
tree | fe6692bc7095a5db53f3d314b494fc97c36b3d36 | |
parent | cadedfc2f61ee027c0e9ca209f15fe28fc2a16f4 (diff) | |
download | kube-aff0fc08492d473f1759b2239376fd2bc0f23a5a.tar.gz kube-aff0fc08492d473f1759b2239376fd2bc0f23a5a.zip |
highlight current index in MailListView
-rw-r--r-- | applications/kmail-quick/package/contents/ui/MailListView.qml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/applications/kmail-quick/package/contents/ui/MailListView.qml b/applications/kmail-quick/package/contents/ui/MailListView.qml index 4d2df816..f8b9b046 100644 --- a/applications/kmail-quick/package/contents/ui/MailListView.qml +++ b/applications/kmail-quick/package/contents/ui/MailListView.qml | |||
@@ -19,6 +19,8 @@ import QtQuick 2.4 | |||
19 | import QtQuick.Controls 1.3 | 19 | import QtQuick.Controls 1.3 |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | 21 | ||
22 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
23 | |||
22 | ScrollView { | 24 | ScrollView { |
23 | id: root | 25 | id: root |
24 | ListView { | 26 | ListView { |
@@ -26,11 +28,22 @@ ScrollView { | |||
26 | 28 | ||
27 | model: mailList.model //MailListModel {} | 29 | model: mailList.model //MailListModel {} |
28 | 30 | ||
29 | delegate: ListItem { | 31 | delegate: PlasmaComponents.ListItem { |
30 | 32 | ||
31 | width: listView.width | 33 | width: listView.width |
32 | height: unit.size * 12 | 34 | height: unit.size * 12 |
33 | 35 | ||
36 | enabled: true | ||
37 | checked: listView.currentIndex == index | ||
38 | |||
39 | MouseArea { | ||
40 | anchors.fill: parent | ||
41 | |||
42 | onClicked: { | ||
43 | listView.currentIndex = model.index | ||
44 | } | ||
45 | } | ||
46 | |||
34 | Rectangle { | 47 | Rectangle { |
35 | id: unread | 48 | id: unread |
36 | 49 | ||