diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-26 11:00:38 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-26 11:01:37 +0200 |
commit | 4b75f2e03fa833f3073ce8a04d936d840b4af2ca (patch) | |
tree | 3e64025c393d0599b09b3780a6d2364a76e32b99 /framework/qml | |
parent | ff20056c16977c4701b6b76d6c78933898e21874 (diff) | |
download | kube-4b75f2e03fa833f3073ce8a04d936d840b4af2ca.tar.gz kube-4b75f2e03fa833f3073ce8a04d936d840b4af2ca.zip |
Made the maillistview a focus scope
and automatically select an index an aquiring focus
Diffstat (limited to 'framework/qml')
-rw-r--r-- | framework/qml/MailListView.qml | 9 |
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 | ||
24 | import org.kube.framework 1.0 as Kube | 24 | import org.kube.framework 1.0 as Kube |
25 | 25 | ||
26 | Item { | 26 | FocusScope { |
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 | } |