summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/MailListView.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-01-09 16:38:55 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-01-09 16:38:55 +0100
commitebe946c66ce8a251ac98583dbebe33a75eab5480 (patch)
tree01263231d1d9d1df6adf4bc4f3c6acd439e15597 /components/package/contents/ui/MailListView.qml
parentca5cdbd3076b5fdc6890c08a1abf8619203a73e4 (diff)
downloadkube-ebe946c66ce8a251ac98583dbebe33a75eab5480.tar.gz
kube-ebe946c66ce8a251ac98583dbebe33a75eab5480.zip
remove app toolbar and move toolbuttons into the columns
Diffstat (limited to 'components/package/contents/ui/MailListView.qml')
-rw-r--r--components/package/contents/ui/MailListView.qml61
1 files changed, 59 insertions, 2 deletions
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml
index cb0bd4bf..68db1c43 100644
--- a/components/package/contents/ui/MailListView.qml
+++ b/components/package/contents/ui/MailListView.qml
@@ -18,6 +18,7 @@
18 18
19import QtQuick 2.7 19import QtQuick 2.7
20import QtQuick.Controls 2.0 20import QtQuick.Controls 2.0
21import QtQuick.Controls 1.4 as Controls
21import QtQuick.Layouts 1.1 22import QtQuick.Layouts 1.1
22import QtQml 2.2 as QtQml 23import QtQml 2.2 as QtQml
23 24
@@ -36,12 +37,68 @@ Item {
36 currentMail = null 37 currentMail = null
37 } 38 }
38 39
39 ListView { 40 ToolBar {
41 id: toolbar
42
43 width: parent.width
44
45 Row {
46 anchors.centerIn: parent
47
48 spacing: Kirigami.Units.smallSpacing
49
50 Controls.ToolButton {
51 iconName: "mail-mark-unread"
52 text: qsTr("Mark As Read")
53 enabled: mailController.markAsReadAction.enabled
54 tooltip: qsTr("mark mail as read")
55 onClicked: {
56 mailController.markAsReadAction.execute()
57 }
58 }
59
60 Controls.ToolButton {
61 iconName: "mail-mark-important"
62 text: qsTr("Mark Important")
63 enabled: mailController.markAsImportantAction.enabled
64 tooltip: qsTr("mark mail as important")
65 onClicked: {
66 mailController.markAsImportantAction.execute()
67 }
68 }
69
70 Controls.ToolButton {
71 iconName: "edit-delete"
72 text: qsTr("Delete Mail")
73 enabled: mailController.moveToTrashAction.enabled
74 tooltip: qsTr("delete email")
75 onClicked: {
76 mailController.moveToTrashAction.execute()
77 }
78 }
79
80 Controls.ToolButton {
81 iconName: "edit-undo"
82 text: qsTr("Restore Mail")
83 enabled: mailController.restoreFromTrashAction.enabled
84 tooltip: qsTr("restore email")
85 onClicked: {
86 mailController.restoreFromTrashAction.execute()
87 }
88 }
89 }
90 }
91
92 ListView {
40 id: listView 93 id: listView
41 94
42 anchors.fill: parent 95 anchors.top: toolbar.bottom
96
97 width: parent.width
98 height: parent.height - toolbar.height
43 99
44 focus: true 100 focus: true
101 clip: true
45 102
46 ScrollBar.vertical: ScrollBar{ 103 ScrollBar.vertical: ScrollBar{
47 id: scrollbar 104 id: scrollbar