summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/mail/contents/ui/main.qml1
-rw-r--r--components/package/contents/ui/MailListView.qml26
2 files changed, 19 insertions, 8 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index 50072ebe..8c5c5d0d 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -159,6 +159,7 @@ Controls2.ApplicationWindow {
159 id: mailListView 159 id: mailListView
160 parentFolder: folderListView.currentFolder 160 parentFolder: folderListView.currentFolder
161 width: Kirigami.Units.gridUnit * 20 161 width: Kirigami.Units.gridUnit * 20
162 height: parent.height
162 Layout.maximumWidth: app.width * 0.4 163 Layout.maximumWidth: app.width * 0.4
163 Layout.minimumWidth: Kirigami.Units.gridUnit * 10 164 Layout.minimumWidth: Kirigami.Units.gridUnit * 10
164 focus: true 165 focus: true
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