diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-12-06 11:48:12 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-12-06 11:48:12 +0100 |
commit | ca230e42076b606f87e651b32e3b58952fcf31c1 (patch) | |
tree | fe6c98cd93d0dba5abac064a560821c52fc777c6 /components/package/contents/ui | |
parent | 9594d734d36c159b0d392e1e8c4f26663418aac8 (diff) | |
download | kube-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.qml | 26 |
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 | ||
19 | import QtQuick 2.4 | 19 | import QtQuick 2.7 |
20 | import QtQuick.Controls 1.4 as Controls | 20 | import QtQuick.Controls 2.0 |
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 |
22 | import QtQml 2.2 as QtQml | 22 | import QtQml 2.2 as QtQml |
23 | 23 | ||
@@ -25,7 +25,7 @@ import org.kde.kirigami 1.0 as Kirigami | |||
25 | 25 | ||
26 | import org.kube.framework.domain 1.0 as KubeFramework | 26 | import org.kube.framework.domain 1.0 as KubeFramework |
27 | 27 | ||
28 | Controls.ScrollView { | 28 | Item { |
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 |