diff options
Diffstat (limited to 'applications/mail-mobile/SingleMailPage.qml')
-rw-r--r-- | applications/mail-mobile/SingleMailPage.qml | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/applications/mail-mobile/SingleMailPage.qml b/applications/mail-mobile/SingleMailPage.qml new file mode 100644 index 00000000..a5ee9b98 --- /dev/null +++ b/applications/mail-mobile/SingleMailPage.qml | |||
@@ -0,0 +1,131 @@ | |||
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 | |||
18 | import QtQuick 2.4 | ||
19 | import QtQuick.Controls 1.3 as Controls | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | import org.kde.kirigami 1.0 as Kirigami | ||
23 | |||
24 | Kirigami.ScrollablePage { | ||
25 | id: root | ||
26 | |||
27 | background: Rectangle { | ||
28 | color: Kirigami.Theme.viewBackgroundColor | ||
29 | } | ||
30 | |||
31 | title: "Read" | ||
32 | |||
33 | mainAction: Kirigami.Action { | ||
34 | iconName: "mail-reply-sender" | ||
35 | |||
36 | onTriggered: { | ||
37 | app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml")) | ||
38 | } | ||
39 | |||
40 | } | ||
41 | contextualActions: [ | ||
42 | Kirigami.Action { | ||
43 | text:"Forward" | ||
44 | iconName: "mail-forward" | ||
45 | onTriggered: { | ||
46 | app.contextDrawer.close() | ||
47 | app.pageStack.push(Qt.resolvedUrl("ComposerPage.qml")) | ||
48 | } | ||
49 | } | ||
50 | ] | ||
51 | |||
52 | Item { | ||
53 | |||
54 | Layout.fillWidth: true | ||
55 | |||
56 | Item { | ||
57 | id: model | ||
58 | property string subject: "We need more Food" | ||
59 | property string sender: "Alice Trump" | ||
60 | property string senderAddress: "alice@wonderland.net" | ||
61 | property string cc: "vdg@kde.org; ross@ccmail.com" | ||
62 | property string time: "2 days ago" | ||
63 | property string body: "Hi Bob, \n \n Ut nibh massa, volutpat quis diam quis, tincidunt consectetur massa. Nulla eu ultricies justo, eu aliquam lacus. Maecenas at interdum est, at luctus nibh. Quisque scelerisque consequat lectus vitae egestas. Maecenas molestie risus id enim consequat dapibus. Ut dapibus hendrerit est, ut aliquam ex fringilla commodo. Donec rutru semper sit amet elit ut volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae. \n \n Cheers, \n \n Alice" | ||
64 | } | ||
65 | |||
66 | Item { | ||
67 | id: content | ||
68 | |||
69 | width: parent.width | ||
70 | |||
71 | Kirigami.Heading { | ||
72 | id: subject | ||
73 | text: model.subject | ||
74 | |||
75 | Layout.fillWidth: true | ||
76 | } | ||
77 | |||
78 | Kirigami.Label { | ||
79 | |||
80 | anchors { | ||
81 | top: subject.bottom | ||
82 | } | ||
83 | |||
84 | text: "From:" | ||
85 | } | ||
86 | |||
87 | Kirigami.Label { | ||
88 | id: sender | ||
89 | anchors { | ||
90 | top: avatar.top | ||
91 | right: avatar.left | ||
92 | } | ||
93 | |||
94 | text: model.sender | ||
95 | } | ||
96 | |||
97 | Kirigami.Label { | ||
98 | |||
99 | anchors { | ||
100 | bottom: avatar.bottom | ||
101 | right: avatar.left | ||
102 | } | ||
103 | |||
104 | text: model.senderAddress | ||
105 | } | ||
106 | |||
107 | Avatar { | ||
108 | id: avatar | ||
109 | |||
110 | anchors { | ||
111 | top: subject.bottom | ||
112 | right: content.right | ||
113 | } | ||
114 | name: model.sender | ||
115 | |||
116 | height: subject.height | ||
117 | width: subject.height | ||
118 | } | ||
119 | |||
120 | Kirigami.Label { | ||
121 | anchors.top: avatar.bottom | ||
122 | |||
123 | width: parent.width | ||
124 | |||
125 | wrapMode: Text.WordWrap | ||
126 | |||
127 | text: model.body | ||
128 | } | ||
129 | } | ||
130 | } | ||
131 | } | ||