diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-02-04 13:59:30 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-02-04 13:59:30 +0100 |
commit | fc1f6b2f4276f67008010e1f12e2eb1bf79da4a9 (patch) | |
tree | d2b040643e34bad2ef72eb89d5764eaa09c62606 | |
parent | 941da63e855f531ae9babd5102f8291f8322f786 (diff) | |
download | kube-fc1f6b2f4276f67008010e1f12e2eb1bf79da4a9.tar.gz kube-fc1f6b2f4276f67008010e1f12e2eb1bf79da4a9.zip |
Compoer + FocusComposer UI
3 files changed, 131 insertions, 8 deletions
diff --git a/applications/kube-mail/package/contents/ui/Composer.qml b/applications/kube-mail/package/contents/ui/Composer.qml index d32ee7c6..66305254 100644 --- a/applications/kube-mail/package/contents/ui/Composer.qml +++ b/applications/kube-mail/package/contents/ui/Composer.qml | |||
@@ -17,12 +17,24 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
20 | import QtQuick.Controls 1.3 | 20 | import QtQuick.Controls 1.4 |
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 |
22 | 22 | ||
23 | Item { | 23 | Item { |
24 | id: root | 24 | id: root |
25 | 25 | ||
26 | function send() { | ||
27 | |||
28 | } | ||
29 | |||
30 | function saveAsDraft() { | ||
31 | |||
32 | } | ||
33 | |||
34 | function clear() { | ||
35 | |||
36 | } | ||
37 | |||
26 | ColumnLayout { | 38 | ColumnLayout { |
27 | 39 | ||
28 | anchors.fill: parent | 40 | anchors.fill: parent |
@@ -32,6 +44,16 @@ Item { | |||
32 | columns: 2 | 44 | columns: 2 |
33 | 45 | ||
34 | Label { | 46 | Label { |
47 | text: "From" | ||
48 | } | ||
49 | |||
50 | ComboBox { | ||
51 | model: ["Kuberich <kuberich@kolabnow.com>", "Uni <kuberich@university.edu>", "Spam <hello.spam@spam.to>"] | ||
52 | |||
53 | Layout.fillWidth: true | ||
54 | } | ||
55 | |||
56 | Label { | ||
35 | text: "To" | 57 | text: "To" |
36 | } | 58 | } |
37 | 59 | ||
@@ -77,11 +99,5 @@ Item { | |||
77 | Layout.fillHeight: true | 99 | Layout.fillHeight: true |
78 | 100 | ||
79 | } | 101 | } |
80 | |||
81 | RowLayout { | ||
82 | Button { | ||
83 | text: "Send" | ||
84 | } | ||
85 | } | ||
86 | } | 102 | } |
87 | } | 103 | } |
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 | |||
19 | import QtQuick 2.4 | ||
20 | import QtQuick.Controls 1.4 | ||
21 | import QtQuick.Layouts 1.1 | ||
22 | |||
23 | Rectangle { | ||
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 | ||
diff --git a/applications/kube-mail/package/contents/ui/main.qml b/applications/kube-mail/package/contents/ui/main.qml index ef37ae19..c1e3fcc3 100644 --- a/applications/kube-mail/package/contents/ui/main.qml +++ b/applications/kube-mail/package/contents/ui/main.qml | |||
@@ -71,7 +71,9 @@ ApplicationWindow { | |||
71 | height: parent.height | 71 | height: parent.height |
72 | iconName: "mail-message-new" | 72 | iconName: "mail-message-new" |
73 | text: "Compose" | 73 | text: "Compose" |
74 | enabled: false | 74 | onClicked: { |
75 | composer.visible = true | ||
76 | } | ||
75 | } | 77 | } |
76 | 78 | ||
77 | PlasmaComponents.ToolButton { | 79 | PlasmaComponents.ToolButton { |
@@ -131,6 +133,12 @@ ApplicationWindow { | |||
131 | 133 | ||
132 | } | 134 | } |
133 | 135 | ||
136 | FocusComposer { | ||
137 | id: composer | ||
138 | |||
139 | anchors.fill: parent | ||
140 | } | ||
141 | |||
134 | //TODO find a better way to scale UI | 142 | //TODO find a better way to scale UI |
135 | Item { | 143 | Item { |
136 | id: unit | 144 | id: unit |