summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-26 11:00:38 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-26 11:01:37 +0200
commit4b75f2e03fa833f3073ce8a04d936d840b4af2ca (patch)
tree3e64025c393d0599b09b3780a6d2364a76e32b99
parentff20056c16977c4701b6b76d6c78933898e21874 (diff)
downloadkube-4b75f2e03fa833f3073ce8a04d936d840b4af2ca.tar.gz
kube-4b75f2e03fa833f3073ce8a04d936d840b4af2ca.zip
Made the maillistview a focus scope
and automatically select an index an aquiring focus
-rw-r--r--framework/qml/MailListView.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml
index a0921a6e..eff3f921 100644
--- a/framework/qml/MailListView.qml
+++ b/framework/qml/MailListView.qml
@@ -23,7 +23,7 @@ import QtQuick.Layouts 1.1
23 23
24import org.kube.framework 1.0 as Kube 24import org.kube.framework 1.0 as Kube
25 25
26Item { 26FocusScope {
27 id: root 27 id: root
28 //Private properties 28 //Private properties
29 property variant parentFolder: null 29 property variant parentFolder: null
@@ -68,12 +68,19 @@ Item {
68 68
69 anchors.fill: parent 69 anchors.fill: parent
70 clip: true 70 clip: true
71 focus: true
71 72
72 ScrollBar.vertical: ScrollBar{ 73 ScrollBar.vertical: ScrollBar{
73 id: scrollbar 74 id: scrollbar
74 } 75 }
75 76
76 //BEGIN keyboard nav 77 //BEGIN keyboard nav
78 onActiveFocusChanged: {
79 if (activeFocus && currentIndex < 0) {
80 currentIndex = 0
81 }
82 }
83
77 Keys.onDownPressed: { 84 Keys.onDownPressed: {
78 incrementCurrentIndex() 85 incrementCurrentIndex()
79 } 86 }