summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-12-06 11:48:12 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-12-06 11:48:12 +0100
commitca230e42076b606f87e651b32e3b58952fcf31c1 (patch)
treefe6c98cd93d0dba5abac064a560821c52fc777c6 /components/package/contents/ui
parent9594d734d36c159b0d392e1e8c4f26663418aac8 (diff)
downloadkube-ca230e42076b606f87e651b32e3b58952fcf31c1.tar.gz
kube-ca230e42076b606f87e651b32e3b58952fcf31c1.zip
port maillistview to qqc2
Diffstat (limited to 'components/package/contents/ui')
-rw-r--r--components/package/contents/ui/MailListView.qml26
1 files changed, 18 insertions, 8 deletions
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml
index bedeeec5..976bfc13 100644
--- a/components/package/contents/ui/MailListView.qml
+++ b/components/package/contents/ui/MailListView.qml
@@ -16,8 +16,8 @@
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/ 17*/
18 18
19import QtQuick 2.4 19import QtQuick 2.7
20import QtQuick.Controls 1.4 as Controls 20import QtQuick.Controls 2.0
21import QtQuick.Layouts 1.1 21import QtQuick.Layouts 1.1
22import QtQml 2.2 as QtQml 22import QtQml 2.2 as QtQml
23 23
@@ -25,7 +25,7 @@ import org.kde.kirigami 1.0 as Kirigami
25 25
26import org.kube.framework.domain 1.0 as KubeFramework 26import org.kube.framework.domain 1.0 as KubeFramework
27 27
28Controls.ScrollView { 28Item {
29 id: root 29 id: root
30 property variant parentFolder 30 property variant parentFolder
31 property variant currentMail 31 property variant currentMail
@@ -38,24 +38,34 @@ Controls.ScrollView {
38 38
39 ListView { 39 ListView {
40 id: listView 40 id: listView
41 currentIndex: root.currentIndex
42 41
43 model: KubeFramework.MailListModel { 42 anchors.fill: parent
44 parentFolder: root.parentFolder 43
44 focus: true
45
46 ScrollBar.vertical: ScrollBar{
47 id: scrollbar
45 } 48 }
46 49
50 //BEGIN keyboard nav
47 Keys.onDownPressed: { 51 Keys.onDownPressed: {
48 incrementCurrentIndex() 52 incrementCurrentIndex()
49 } 53 }
50 Keys.onUpPressed: { 54 Keys.onUpPressed: {
51 decrementCurrentIndex() 55 decrementCurrentIndex()
52 } 56 }
53 focus: true 57 //END keyboard nav
58
59 currentIndex: root.currentIndex
60
61 model: KubeFramework.MailListModel {
62 parentFolder: root.parentFolder
63 }
54 64
55 delegate: Kirigami.AbstractListItem { 65 delegate: Kirigami.AbstractListItem {
56 id: mailListDelegate 66 id: mailListDelegate
57 67
58 width: listView.width 68 width: scrollbar.visible ? listView.width - scrollbar.width : listView.width
59 height: Kirigami.Units.gridUnit * 4 69 height: Kirigami.Units.gridUnit * 4
60 70
61 enabled: true 71 enabled: true