summaryrefslogtreecommitdiffstats
path: root/applications/kube-mail/package/contents/ui/FocusComposer.qml
diff options
context:
space:
mode:
Diffstat (limited to 'applications/kube-mail/package/contents/ui/FocusComposer.qml')
-rw-r--r--applications/kube-mail/package/contents/ui/FocusComposer.qml99
1 files changed, 99 insertions, 0 deletions
diff --git a/applications/kube-mail/package/contents/ui/FocusComposer.qml b/applications/kube-mail/package/contents/ui/FocusComposer.qml
new file mode 100644
index 00000000..20899817
--- /dev/null
+++ b/applications/kube-mail/package/contents/ui/FocusComposer.qml
@@ -0,0 +1,99 @@
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//import org.kde.kube.mail 1.0 as Mail
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import QtQuick.Controls 1.4
21import QtQuick.Layouts 1.1
22
23Rectangle {
24 id: root
25
26 visible: false
27
28 color: colorPalette.border
29
30 opacity: 0.9
31
32 MouseArea {
33 anchors.fill: parent
34
35 onClicked: {
36 root.visible = false
37 }
38 }
39
40 Rectangle {
41 anchors.centerIn: parent
42
43 height: root.height * 0.8
44 width: root.width * 0.8
45
46 color: colorPalette.background
47
48 MouseArea {
49 anchors.fill: parent
50 }
51
52 ColumnLayout {
53
54 anchors {
55 fill: parent
56 margins: unit.size * 3
57 }
58
59 Composer {
60 id: composer
61
62 Layout.fillWidth: true
63 Layout.fillHeight: true
64
65 }
66
67 RowLayout {
68 Layout.fillWidth: true
69
70 Button {
71 text: "Send"
72
73 onClicked: {
74 composer.send()
75 root.visible = false
76 }
77 }
78
79 Button {
80 text: "Save Draft"
81
82 onClicked: {
83 composer.saveAsDraft()
84 root.visible = false
85 }
86 }
87
88 Button {
89 text: "Discard"
90
91 onClicked: {
92 composer.clear()
93 root.visible = false
94 }
95 }
96 }
97 }
98 }
99} \ No newline at end of file