summaryrefslogtreecommitdiffstats
path: root/applications/mail-mobile/FolderPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'applications/mail-mobile/FolderPage.qml')
-rw-r--r--applications/mail-mobile/FolderPage.qml120
1 files changed, 0 insertions, 120 deletions
diff --git a/applications/mail-mobile/FolderPage.qml b/applications/mail-mobile/FolderPage.qml
deleted file mode 100644
index 42c150e8..00000000
--- a/applications/mail-mobile/FolderPage.qml
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2 * Copyright (C) 2016 Michael Bohlender <michael.bohlender@kdemail.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18import QtQuick 2.4
19import QtQuick.Controls 1.4 as Controls
20import QtQuick.Layouts 1.2
21
22import org.kde.kirigami 1.0 as Kirigami
23
24Kirigami.ScrollablePage {
25 id: root
26
27 anchors.fill: parent
28
29 background: Rectangle {
30 color: Kirigami.Theme.viewBackgroundColor
31 }
32
33 mainAction: Kirigami.Action {
34 iconName: "mail-message-new"
35
36 onTriggered: {
37 app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml"))
38 }
39
40 }
41
42 ListView {
43 id: listView
44
45 model: MailListModel {}
46
47 delegate: Kirigami.SwipeListItem {
48 id: mailListDelegate
49
50 property bool important: model.important
51 property bool unread: model.unread
52
53 actions: [
54 Kirigami.Action {
55 iconName: "mail-mark-important"
56
57 onTriggered: {
58 if(important) {
59 important = false
60 } else {
61 important = true
62 }
63 }
64 },
65 Kirigami.Action {
66 iconName: "mail-mark-unread-new"
67
68 onTriggered: {
69 if(unread) {
70 unread = false
71 } else {
72 unread = true
73 }
74 }
75 },
76 Kirigami.Action {
77 iconName: "entry-delete"
78 }
79 ]
80
81 enabled: true
82
83 onClicked: {
84 app.pageStack.push(Qt.resolvedUrl("MailListPage.qml"))
85 }
86
87 RowLayout {
88 anchors.fill: parent
89
90 width: parent.width
91
92 Avatar {
93 id: avatar
94
95 height: textItem.height * 0.9
96 width: height
97
98 name: model.sender
99 }
100
101 ColumnLayout {
102 id: textItem
103
104 Controls.Label {
105 text: model.subject
106
107 color: important ? "#da4453" : unread ? "#1d99f3" : Kirigami.Theme.textColor
108 }
109
110 Controls.Label {
111 text: model.sender
112 }
113 Item {
114 Layout.fillWidth: true
115 }
116 }
117 }
118 }
119 }
120}