diff options
Diffstat (limited to 'components/mail')
-rw-r--r-- | components/mail/contents/ui/main.qml | 187 |
1 files changed, 151 insertions, 36 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 20fa25c1..8ee1c794 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -1,20 +1,20 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (C) 2015 Michael Bohlender, <michael.bohlender@kdemail.net> | 2 | * Copyright (C) 2017 Michael Bohlender, <michael.bohlender@kdemail.net> |
3 | 3 | * | |
4 | This program is free software; you can redistribute it and/or modify | 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 | 5 | * it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | (at your option) any later version. | 7 | * (at your option) any later version. |
8 | 8 | * | |
9 | This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | 13 | * | |
14 | You should have received a copy of the GNU General Public License along | 14 | * You should have received a copy of the GNU General Public License along |
15 | with this program; if not, write to the Free Software Foundation, Inc., | 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
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 | 19 | ||
20 | import QtQuick 2.7 | 20 | import QtQuick 2.7 |
@@ -35,8 +35,8 @@ Controls2.ApplicationWindow { | |||
35 | 35 | ||
36 | //FIXME remove fixed pixel hight | 36 | //FIXME remove fixed pixel hight |
37 | //for now just convinience during testing | 37 | //for now just convinience during testing |
38 | height: 1080 * 0.7 | 38 | height: 1080 * 0.8 |
39 | width: 1920 * 0.7 | 39 | width: 1920 * 0.8 |
40 | 40 | ||
41 | visible: true | 41 | visible: true |
42 | 42 | ||
@@ -92,7 +92,6 @@ Controls2.ApplicationWindow { | |||
92 | folder: folderListView.currentFolder | 92 | folder: folderListView.currentFolder |
93 | } | 93 | } |
94 | 94 | ||
95 | |||
96 | //BEGIN Shortcuts | 95 | //BEGIN Shortcuts |
97 | Shortcut { | 96 | Shortcut { |
98 | sequence: StandardKey.Refresh | 97 | sequence: StandardKey.Refresh |
@@ -139,24 +138,103 @@ Controls2.ApplicationWindow { | |||
139 | 138 | ||
140 | color: Kirigami.Theme.textColor | 139 | color: Kirigami.Theme.textColor |
141 | 140 | ||
142 | Controls2.Button { | 141 | Controls2.ToolBar { |
143 | id: newMailButton | 142 | id: toolBar |
144 | 143 | ||
145 | anchors { | 144 | anchors { |
146 | top: parent.top | 145 | top: parent.top |
147 | left: parent.left | 146 | left: parent.left |
148 | right: parent.right | 147 | right: parent.right |
149 | margins: Kirigami.Units.smallSpacing | ||
150 | } | 148 | } |
151 | 149 | ||
150 | RowLayout { | ||
151 | anchors.centerIn: parent | ||
152 | |||
153 | spacing: Kirigami.Units.largeSpacing | ||
154 | |||
155 | KubeComponents.AccountSwitcher { | ||
156 | id: accountSwitcher | ||
157 | |||
158 | iconName: "kdenlive-menu" | ||
159 | height: Kirigami.Units.gridUnit * 1.5 | ||
160 | width: height | ||
161 | } | ||
162 | |||
163 | ToolButton { | ||
164 | iconName: "user" | ||
165 | height: Kirigami.Units.gridUnit * 1.5 | ||
166 | width: height | ||
167 | |||
168 | onClicked: { | ||
169 | people.open() | ||
170 | } | ||
171 | } | ||
172 | |||
173 | ToolButton { | ||
174 | iconName: "search" | ||
175 | height: Kirigami.Units.gridUnit * 1.5 | ||
176 | width: height | ||
177 | |||
178 | onClicked: { | ||
179 | search.open() | ||
180 | } | ||
181 | } | ||
182 | } | ||
183 | } | ||
184 | |||
185 | Rectangle { | ||
186 | id: newMailButton | ||
187 | |||
188 | anchors { | ||
189 | top: toolBar.bottom | ||
190 | left: parent.left | ||
191 | right: parent.right | ||
192 | margins: Kirigami.Units.largeSpacing | ||
193 | } | ||
194 | |||
195 | color: "#27ae60" | ||
196 | clip: true | ||
197 | |||
152 | height: Kirigami.Units.gridUnit * 1.5 | 198 | height: Kirigami.Units.gridUnit * 1.5 |
153 | 199 | ||
154 | text: " " + qsTr("New Email") + " " | 200 | Text { |
201 | anchors.centerIn: parent | ||
202 | |||
203 | text: qsTr("New Email") | ||
204 | color: "white" | ||
205 | } | ||
155 | //iconName: "mail-message-new" | 206 | //iconName: "mail-message-new" |
156 | //Controls2.Tooltip.text: "compose new email" | 207 | //Controls2.Tooltip.text: "compose new email" |
157 | 208 | ||
158 | onClicked: { | 209 | MouseArea { |
159 | composer.open() | 210 | anchors.fill: parent |
211 | onClicked: { | ||
212 | composer.open() | ||
213 | } | ||
214 | } | ||
215 | } | ||
216 | |||
217 | Item { | ||
218 | id: accountName | ||
219 | |||
220 | anchors { | ||
221 | top: newMailButton.bottom | ||
222 | topMargin: Kirigami.Units.smallSpacing | ||
223 | } | ||
224 | |||
225 | width: parent.width | ||
226 | height: Kirigami.Units.gridUnit * 2 | ||
227 | |||
228 | Text { | ||
229 | anchors { | ||
230 | bottom: parent.bottom | ||
231 | left: parent.left | ||
232 | leftMargin: Kirigami.Units.smallSpacing | ||
233 | } | ||
234 | |||
235 | text: accountSwitcher.accountName | ||
236 | font.weight: Font.DemiBold | ||
237 | color: "white" | ||
160 | } | 238 | } |
161 | } | 239 | } |
162 | 240 | ||
@@ -164,24 +242,16 @@ Controls2.ApplicationWindow { | |||
164 | id: folderListView | 242 | id: folderListView |
165 | 243 | ||
166 | anchors { | 244 | anchors { |
167 | top: newMailButton.bottom | 245 | top: accountName.bottom |
168 | bottom: accountSwitcher.top | 246 | topMargin: Kirigami.Units.smallSpacing |
247 | bottom: parent.bottom | ||
169 | left: parent.left | 248 | left: parent.left |
170 | right: parent.right | 249 | right: parent.right |
171 | topMargin: Kirigami.Units.smallSpacing | ||
172 | } | 250 | } |
173 | 251 | ||
174 | focus: true | 252 | focus: true |
175 | accountId: accountSwitcher.accountId | 253 | accountId: accountSwitcher.accountId |
176 | } | 254 | } |
177 | KubeComponents.AccountSwitcher { | ||
178 | id: accountSwitcher | ||
179 | |||
180 | anchors.bottom: parent.bottom | ||
181 | |||
182 | width: parent.width | ||
183 | height: Kirigami.Units.gridUnit * 2 | ||
184 | } | ||
185 | } | 255 | } |
186 | 256 | ||
187 | KubeComponents.MailListView { | 257 | KubeComponents.MailListView { |
@@ -225,4 +295,49 @@ Controls2.ApplicationWindow { | |||
225 | y: app.height * 0.075 | 295 | y: app.height * 0.075 |
226 | } | 296 | } |
227 | //END AccountWizard | 297 | //END AccountWizard |
298 | |||
299 | //BEGIN Search | ||
300 | Controls2.Popup { | ||
301 | id: search | ||
302 | |||
303 | width: app.width * 0.6 | ||
304 | height: Kirigami.Units.gridUnit * 3 | ||
305 | |||
306 | x: app.width * 0.2 | ||
307 | y: app.height * 0.2 | ||
308 | |||
309 | modal: true | ||
310 | focus: true | ||
311 | |||
312 | RowLayout { | ||
313 | anchors.fill: parent | ||
314 | |||
315 | Controls2.TextField { | ||
316 | Layout.fillWidth: true | ||
317 | placeholderText: "Search... is not available in this beta" | ||
318 | } | ||
319 | |||
320 | Controls2.Button { | ||
321 | text: "Go" | ||
322 | |||
323 | onClicked: { | ||
324 | search.close() | ||
325 | } | ||
326 | } | ||
327 | } | ||
328 | } | ||
329 | //END Search | ||
330 | |||
331 | //BEGIN People | ||
332 | KubeComponents.People { | ||
333 | id: people | ||
334 | |||
335 | height: app.height * 0.85 | ||
336 | width: app.width * 0.85 | ||
337 | |||
338 | x: app.width * 0.075 | ||
339 | y: app.height * 0.075 | ||
340 | |||
341 | } | ||
342 | //END People | ||
228 | } | 343 | } |