summaryrefslogtreecommitdiffstats
path: root/applications
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-11 09:46:59 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-11 09:46:59 +0100
commite5f03361dfe42533dcca34d28d93ab0ad9efa443 (patch)
tree52321704d238b5b8ba99f4fde5f84e60d5265df1 /applications
parent547bf757f757d6072791b19a5cb8e206b0ad5a0d (diff)
downloadkube-e5f03361dfe42533dcca34d28d93ab0ad9efa443.tar.gz
kube-e5f03361dfe42533dcca34d28d93ab0ad9efa443.zip
Keyboard navigation
It should work natively I think, but for some reason it doesn't.
Diffstat (limited to 'applications')
-rw-r--r--applications/kube-mail/package/contents/ui/MailListView.qml19
-rw-r--r--applications/kube-mail/package/contents/ui/main.qml1
2 files changed, 17 insertions, 3 deletions
diff --git a/applications/kube-mail/package/contents/ui/MailListView.qml b/applications/kube-mail/package/contents/ui/MailListView.qml
index 5e830b73..ff773e0e 100644
--- a/applications/kube-mail/package/contents/ui/MailListView.qml
+++ b/applications/kube-mail/package/contents/ui/MailListView.qml
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18import QtQuick 2.4 18import QtQuick 2.4
19import QtQuick.Controls 1.3 19import QtQuick.Controls 1.4
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21 21
22import QtQml 2.2 22import QtQml 2.2
@@ -37,20 +37,33 @@ ScrollView {
37 parentFolder: root.parentFolder 37 parentFolder: root.parentFolder
38 } 38 }
39 39
40 delegate: PlasmaComponents.ListItem { 40 Keys.onDownPressed: {
41 incrementCurrentIndex()
42 }
43 Keys.onUpPressed: {
44 decrementCurrentIndex()
45 }
46 focus: true
41 47
48 delegate: PlasmaComponents.ListItem {
42 width: listView.width 49 width: listView.width
43 height: unit.size * 12 50 height: unit.size * 12
44 51
45 enabled: true 52 enabled: true
46 checked: listView.currentIndex == index 53 checked: listView.currentIndex == index
47 54
55 Binding {
56 target: root
57 property: "currentMail"
58 when: listView.currentIndex == index
59 value: model.domainObject
60 }
61
48 MouseArea { 62 MouseArea {
49 anchors.fill: parent 63 anchors.fill: parent
50 64
51 onClicked: { 65 onClicked: {
52 listView.currentIndex = model.index 66 listView.currentIndex = model.index
53 root.currentMail = model.domainObject
54 } 67 }
55 } 68 }
56 69
diff --git a/applications/kube-mail/package/contents/ui/main.qml b/applications/kube-mail/package/contents/ui/main.qml
index c1e3fcc3..ed8c7d17 100644
--- a/applications/kube-mail/package/contents/ui/main.qml
+++ b/applications/kube-mail/package/contents/ui/main.qml
@@ -123,6 +123,7 @@ ApplicationWindow {
123 width: unit.size * 80 123 width: unit.size * 80
124 Layout.maximumWidth: unit.size * 250 124 Layout.maximumWidth: unit.size * 250
125 Layout.minimumWidth: unit.size * 50 125 Layout.minimumWidth: unit.size * 50
126 focus: true
126 } 127 }
127 128
128 SingleMailView { 129 SingleMailView {