diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-04-03 02:17:25 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2016-04-03 02:17:25 +0200 |
commit | 5f2a3aa64cedc7f5517a1047dd699a286faf1898 (patch) | |
tree | 69a7cdd7b30c2966318c0e444b5cd39f3a46d292 /applications/kube-mail-mobile | |
parent | db8d420485fe75ebbb45f4b6db978311c0dbf8c1 (diff) | |
download | kube-5f2a3aa64cedc7f5517a1047dd699a286faf1898.tar.gz kube-5f2a3aa64cedc7f5517a1047dd699a286faf1898.zip |
port mail mobile to kirigami components + implement VDG Mockups
Diffstat (limited to 'applications/kube-mail-mobile')
-rw-r--r-- | applications/kube-mail-mobile/Avatar.qml | 54 | ||||
-rw-r--r-- | applications/kube-mail-mobile/ColorPalette.qml | 27 | ||||
-rw-r--r-- | applications/kube-mail-mobile/ComposerView.qml | 127 | ||||
-rw-r--r-- | applications/kube-mail-mobile/FolderListModel.qml | 81 | ||||
-rw-r--r-- | applications/kube-mail-mobile/FolderListView.qml | 121 | ||||
-rw-r--r-- | applications/kube-mail-mobile/MailListModel.qml | 149 | ||||
-rw-r--r-- | applications/kube-mail-mobile/MailListView.qml | 197 | ||||
-rw-r--r-- | applications/kube-mail-mobile/SingleMailView.qml | 171 | ||||
-rw-r--r-- | applications/kube-mail-mobile/main.qml | 51 |
9 files changed, 0 insertions, 978 deletions
diff --git a/applications/kube-mail-mobile/Avatar.qml b/applications/kube-mail-mobile/Avatar.qml deleted file mode 100644 index 3d3ffb2e..00000000 --- a/applications/kube-mail-mobile/Avatar.qml +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | |||
20 | Rectangle { | ||
21 | |||
22 | property string name; | ||
23 | |||
24 | //TODO should we make this themeable ? | ||
25 | function calcColor(x) | ||
26 | { | ||
27 | switch (x % 5) { | ||
28 | case 0: | ||
29 | return "#16a085" | ||
30 | case 1: | ||
31 | return "#27ae60" | ||
32 | case 2: | ||
33 | return "#2980b9" | ||
34 | case 3: | ||
35 | return "#8e44ad" | ||
36 | case 4: | ||
37 | return "#c0392b" | ||
38 | } | ||
39 | } | ||
40 | |||
41 | radius: 2 | ||
42 | |||
43 | color: calcColor(name.length) | ||
44 | |||
45 | Text { | ||
46 | anchors.centerIn: parent | ||
47 | |||
48 | text: name.charAt(0) | ||
49 | |||
50 | font.pointSize: unit.font.pixelSize * 1.2 | ||
51 | |||
52 | color: "#ecf0f1" | ||
53 | } | ||
54 | } | ||
diff --git a/applications/kube-mail-mobile/ColorPalette.qml b/applications/kube-mail-mobile/ColorPalette.qml deleted file mode 100644 index c3993954..00000000 --- a/applications/kube-mail-mobile/ColorPalette.qml +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | |||
20 | //TODO probably expose it from the Cpp side | ||
21 | Item { | ||
22 | property string background: "#fcfcfc" | ||
23 | property string selected: "#3daee9" | ||
24 | property string read: "#232629" | ||
25 | property string border: "#232629" | ||
26 | } | ||
27 | |||
diff --git a/applications/kube-mail-mobile/ComposerView.qml b/applications/kube-mail-mobile/ComposerView.qml deleted file mode 100644 index d2f478b0..00000000 --- a/applications/kube-mail-mobile/ComposerView.qml +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack | ||
26 | |||
27 | //toolbar | ||
28 | ToolBar { | ||
29 | id: toolBar | ||
30 | |||
31 | RowLayout { | ||
32 | |||
33 | width: parent.width | ||
34 | |||
35 | spacing: unit.width * 8 | ||
36 | |||
37 | ToolButton { | ||
38 | iconName: "go-previous" | ||
39 | |||
40 | onClicked: stack.pop() | ||
41 | } | ||
42 | |||
43 | ToolButton { | ||
44 | iconName: "mail-reply-sender" | ||
45 | } | ||
46 | |||
47 | //FIXME spacer? | ||
48 | Label { | ||
49 | text: "" | ||
50 | Layout.fillWidth: true | ||
51 | } | ||
52 | |||
53 | ToolButton { | ||
54 | iconName: "mail-attachment" | ||
55 | } | ||
56 | |||
57 | ToolButton { | ||
58 | iconName: "mail-send" | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | |||
63 | //main content | ||
64 | Rectangle { | ||
65 | |||
66 | anchors { | ||
67 | top: toolBar.bottom | ||
68 | right: parent.right | ||
69 | left: parent.left | ||
70 | bottom: parent.bottom | ||
71 | } | ||
72 | |||
73 | color: colorPalette.background | ||
74 | |||
75 | ColumnLayout { | ||
76 | |||
77 | anchors { | ||
78 | top: parent.top | ||
79 | left: parent.left | ||
80 | right: parent.right | ||
81 | |||
82 | margins: unit.width * 5 | ||
83 | |||
84 | } | ||
85 | |||
86 | spacing: unit.height | ||
87 | |||
88 | RowLayout { | ||
89 | id: from | ||
90 | |||
91 | width: parent.width | ||
92 | |||
93 | spacing: unit.width * 5 | ||
94 | |||
95 | Label { | ||
96 | text: "From" | ||
97 | } | ||
98 | |||
99 | Button { | ||
100 | Layout.fillWidth: true | ||
101 | |||
102 | text: "meep@monkey.com" | ||
103 | |||
104 | } | ||
105 | |||
106 | } | ||
107 | |||
108 | RowLayout { | ||
109 | id: to | ||
110 | |||
111 | width: parent.width | ||
112 | |||
113 | spacing: unit.width * 5 | ||
114 | |||
115 | Label { | ||
116 | text: "To" | ||
117 | } | ||
118 | |||
119 | TextField { | ||
120 | Layout.fillWidth: true | ||
121 | |||
122 | } | ||
123 | |||
124 | } | ||
125 | } | ||
126 | } | ||
127 | } | ||
diff --git a/applications/kube-mail-mobile/FolderListModel.qml b/applications/kube-mail-mobile/FolderListModel.qml deleted file mode 100644 index 19093d51..00000000 --- a/applications/kube-mail-mobile/FolderListModel.qml +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | |||
20 | ListModel { | ||
21 | ListElement { | ||
22 | icon: "" | ||
23 | name: " kolabnow" | ||
24 | topLvl: true | ||
25 | } | ||
26 | ListElement { | ||
27 | icon: "mail-folder-inbox" | ||
28 | name: "Inbox" | ||
29 | } | ||
30 | ListElement { | ||
31 | icon: "mail-folder-sent" | ||
32 | name: "Sent" | ||
33 | } | ||
34 | ListElement { | ||
35 | icon: "user-trash" | ||
36 | name: "Trash" | ||
37 | } | ||
38 | ListElement { | ||
39 | icon: "document-edit" | ||
40 | name: "Drafts" | ||
41 | } | ||
42 | |||
43 | ListElement { | ||
44 | icon: "folder" | ||
45 | name: "dragons" | ||
46 | } | ||
47 | ListElement { | ||
48 | icon: "folder" | ||
49 | name: "long tailed dragons" | ||
50 | } | ||
51 | |||
52 | ListElement { | ||
53 | icon: "" | ||
54 | name: " campus.lmu.de" | ||
55 | topLvl: true | ||
56 | } | ||
57 | ListElement { | ||
58 | icon: "mail-folder-inbox" | ||
59 | name: "Inbox" | ||
60 | } | ||
61 | ListElement { | ||
62 | icon: "mail-folder-sent" | ||
63 | name: "Sent" | ||
64 | } | ||
65 | ListElement { | ||
66 | icon: "user-trash" | ||
67 | name: "Trash" | ||
68 | } | ||
69 | ListElement { | ||
70 | icon: "document-edit" | ||
71 | name: "Drafts" | ||
72 | } | ||
73 | ListElement { | ||
74 | icon: "folder" | ||
75 | name: "pim" | ||
76 | } | ||
77 | ListElement { | ||
78 | icon: "folder" | ||
79 | name: "vdg" | ||
80 | } | ||
81 | } | ||
diff --git a/applications/kube-mail-mobile/FolderListView.qml b/applications/kube-mail-mobile/FolderListView.qml deleted file mode 100644 index 1baa03b6..00000000 --- a/applications/kube-mail-mobile/FolderListView.qml +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | |||
27 | //toolbar | ||
28 | ToolBar { | ||
29 | id: toolBar | ||
30 | |||
31 | RowLayout { | ||
32 | |||
33 | width: parent.width | ||
34 | |||
35 | spacing: unit.width * 5 | ||
36 | |||
37 | ToolButton { | ||
38 | anchors.right: parent.right | ||
39 | |||
40 | iconName: "system-search" | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | |||
45 | //main content | ||
46 | ListView { | ||
47 | |||
48 | anchors { | ||
49 | top: toolBar.bottom | ||
50 | right: parent.right | ||
51 | left: parent.left | ||
52 | bottom: parent.bottom | ||
53 | } | ||
54 | |||
55 | clip: true | ||
56 | |||
57 | model: FolderListModel { } | ||
58 | |||
59 | |||
60 | delegate: Item { | ||
61 | |||
62 | height: unit.width * 20 | ||
63 | width: parent.width | ||
64 | |||
65 | MouseArea { | ||
66 | id: mouseArea | ||
67 | |||
68 | anchors.fill: parent | ||
69 | |||
70 | onClicked: { | ||
71 | stack.push({"item": Qt.resolvedUrl("MailListView.qml"), properties: {stack: stack, folderId: model.name}}) | ||
72 | } | ||
73 | } | ||
74 | |||
75 | //background | ||
76 | Rectangle { | ||
77 | anchors.fill: parent | ||
78 | |||
79 | color: colorPalette.background | ||
80 | } | ||
81 | |||
82 | //clickColor | ||
83 | Rectangle { | ||
84 | id: clickColor | ||
85 | anchors.fill: parent | ||
86 | |||
87 | color: colorPalette.selected | ||
88 | opacity: 0.4 | ||
89 | |||
90 | visible: mouseArea.pressed | ||
91 | } | ||
92 | |||
93 | //FIXME without useing PlasmaComponents | ||
94 | ToolButton { | ||
95 | id: icon | ||
96 | |||
97 | anchors { | ||
98 | verticalCenter: parent.verticalCenter | ||
99 | left: parent.left | ||
100 | leftMargin: unit.width * 10 | ||
101 | } | ||
102 | |||
103 | iconName: model.icon | ||
104 | |||
105 | } | ||
106 | |||
107 | Label { | ||
108 | |||
109 | anchors{ | ||
110 | left: icon.right | ||
111 | leftMargin: unit.width * 15 | ||
112 | verticalCenter: icon.verticalCenter | ||
113 | } | ||
114 | |||
115 | text: model.name | ||
116 | |||
117 | font.weight: model.topLvl ? Font.DemiBold : Font.Normal | ||
118 | } | ||
119 | } | ||
120 | } | ||
121 | } | ||
diff --git a/applications/kube-mail-mobile/MailListModel.qml b/applications/kube-mail-mobile/MailListModel.qml deleted file mode 100644 index 4b425b90..00000000 --- a/applications/kube-mail-mobile/MailListModel.qml +++ /dev/null | |||
@@ -1,149 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | |||
20 | ListModel { | ||
21 | ListElement { | ||
22 | sender: "mighty@mail.com" | ||
23 | senderName: "Mighty Monkey" | ||
24 | subject: "I feel weak without my bananas" | ||
25 | date: "Today 19:21" | ||
26 | unread: true | ||
27 | } | ||
28 | ListElement { | ||
29 | sender: "benni@bandana.org" | ||
30 | senderName: "Ben Bandana" | ||
31 | subject: "Check this out" | ||
32 | date: "Today 16:01" | ||
33 | unread: true | ||
34 | } | ||
35 | ListElement { | ||
36 | sender: "alice@mail.com" | ||
37 | senderName: "Alice Cheng" | ||
38 | subject: "Re: We need more food" | ||
39 | date: "Today 12:55" | ||
40 | unread: false | ||
41 | } | ||
42 | ListElement { | ||
43 | sender: "bob@bandana.org" | ||
44 | senderName: "Bob Ross" | ||
45 | subject: "KDE Rocks" | ||
46 | date: "Today 07:32" | ||
47 | unread: true | ||
48 | } | ||
49 | ListElement { | ||
50 | sender: "tiny@mail.com" | ||
51 | senderName: "Tiny" | ||
52 | subject: "Huge success!!" | ||
53 | date: "Today 00:11" | ||
54 | unread: false | ||
55 | } | ||
56 | ListElement { | ||
57 | sender: "bob@bandana.org" | ||
58 | senderName: "Bob Ross" | ||
59 | subject: "KDE Rocks" | ||
60 | date: "Yesterday 20:54" | ||
61 | unread: false | ||
62 | } | ||
63 | ListElement { | ||
64 | sender: "Laura@mail.com" | ||
65 | senderName: "Laura B" | ||
66 | subject: ":)" | ||
67 | date: "Monday 12:37" | ||
68 | unread: false | ||
69 | } | ||
70 | ListElement { | ||
71 | sender: "Andreas@stars.org" | ||
72 | senderName: "Andreas Rockstar" | ||
73 | subject: "KDE Rocks" | ||
74 | date: "Monday 12:37" | ||
75 | unread: false | ||
76 | } | ||
77 | ListElement { | ||
78 | sender: "alice@mail.com" | ||
79 | senderName: "Alice Cheng" | ||
80 | subject: "Re: We need more food" | ||
81 | date: "Monday 12:37" | ||
82 | } | ||
83 | ListElement { | ||
84 | sender: "bob@bandana.org" | ||
85 | senderName: "Bob Ross" | ||
86 | subject: "KDE Rocks" | ||
87 | date: "Monday 12:37" | ||
88 | } | ||
89 | ListElement { | ||
90 | sender: "mighty@mail.com" | ||
91 | senderName: "Mighty Monkey" | ||
92 | subject: "I feel weak without my bananas" | ||
93 | date: "2 hours ago" | ||
94 | } | ||
95 | ListElement { | ||
96 | sender: "benni@bandana.org" | ||
97 | senderName: "Ben Bandana" | ||
98 | subject: "Check this out" | ||
99 | date: "8 hours ago" | ||
100 | } | ||
101 | ListElement { | ||
102 | sender: "alice@mail.com" | ||
103 | senderName: "Alice Cheng" | ||
104 | subject: "Re: We need more food" | ||
105 | date: "2 hours ago" | ||
106 | } | ||
107 | ListElement { | ||
108 | sender: "bob@bandana.org" | ||
109 | senderName: "Bob Ross" | ||
110 | subject: "KDE Rocks" | ||
111 | date: "8 hours ago" | ||
112 | } | ||
113 | ListElement { | ||
114 | sender: "tiny@mail.com" | ||
115 | senderName: "Tiny" | ||
116 | subject: "Huge success!!" | ||
117 | date: "2 hours ago" | ||
118 | } | ||
119 | ListElement { | ||
120 | sender: "bob@bandana.org" | ||
121 | senderName: "Bob Ross" | ||
122 | subject: "KDE Rocks" | ||
123 | date: "8 hours ago" | ||
124 | } | ||
125 | ListElement { | ||
126 | sender: "Laura@mail.com" | ||
127 | senderName: "Laura B" | ||
128 | subject: ":)" | ||
129 | date: "2 hours ago" | ||
130 | } | ||
131 | ListElement { | ||
132 | sender: "Andreas@stars.org" | ||
133 | senderName: "Andreas Rockstar" | ||
134 | subject: "KDE Rocks" | ||
135 | date: "8 hours ago" | ||
136 | } | ||
137 | ListElement { | ||
138 | sender: "alice@mail.com" | ||
139 | senderName: "Alice Cheng" | ||
140 | subject: "Re: We need more food" | ||
141 | date: "2 hours ago" | ||
142 | } | ||
143 | ListElement { | ||
144 | sender: "bob@bandana.org" | ||
145 | senderName: "Bob Ross" | ||
146 | subject: "Board Task: Write draft email to people with KDE accounts commiting to Qt repositories" | ||
147 | date: "8 hours ago" | ||
148 | } | ||
149 | } | ||
diff --git a/applications/kube-mail-mobile/MailListView.qml b/applications/kube-mail-mobile/MailListView.qml deleted file mode 100644 index 869ce5e5..00000000 --- a/applications/kube-mail-mobile/MailListView.qml +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | property string folderId; | ||
27 | |||
28 | //toolbar | ||
29 | ToolBar { | ||
30 | id: toolBar | ||
31 | |||
32 | RowLayout { | ||
33 | |||
34 | width: parent.width | ||
35 | |||
36 | spacing: unit.width * 8 | ||
37 | |||
38 | ToolButton { | ||
39 | iconName: "go-previous" | ||
40 | |||
41 | onClicked: stack.pop() | ||
42 | } | ||
43 | |||
44 | Label { | ||
45 | Layout.fillWidth: true | ||
46 | |||
47 | text: "Current Folder Name" | ||
48 | } | ||
49 | |||
50 | ToolButton { | ||
51 | anchors.right: parent.right | ||
52 | |||
53 | iconName: "system-search" | ||
54 | } | ||
55 | } | ||
56 | } | ||
57 | |||
58 | //main content | ||
59 | ListView { | ||
60 | id: listView | ||
61 | |||
62 | anchors { | ||
63 | top: toolBar.bottom | ||
64 | right: parent.right | ||
65 | left: parent.left | ||
66 | bottom: parent.bottom | ||
67 | } | ||
68 | |||
69 | clip: true | ||
70 | |||
71 | model: MailListModel { } | ||
72 | |||
73 | delegate: Item { | ||
74 | id: delegateRoot | ||
75 | |||
76 | readonly property bool isCurrentItem: ListView.isCurrentItem | ||
77 | |||
78 | height: unit.width * 25 | ||
79 | width: parent.width | ||
80 | |||
81 | MouseArea { | ||
82 | id: mouseArea | ||
83 | |||
84 | anchors.fill: parent | ||
85 | |||
86 | onClicked: { | ||
87 | stack.push({"item": Qt.resolvedUrl("SingleMailView.qml"), properties: {stack: stack}}) | ||
88 | } | ||
89 | } | ||
90 | |||
91 | Rectangle { | ||
92 | anchors.fill: parent | ||
93 | |||
94 | color: colorPalette.background | ||
95 | |||
96 | |||
97 | //read | ||
98 | Rectangle { | ||
99 | anchors.fill: parent | ||
100 | |||
101 | color: colorPalette.read | ||
102 | opacity: 0.1 | ||
103 | |||
104 | visible: delegateRoot.isCurrentItem !== model.index && model.unread === false | ||
105 | } | ||
106 | |||
107 | //clickColor | ||
108 | Rectangle { | ||
109 | id: clickColor | ||
110 | anchors.fill: parent | ||
111 | |||
112 | color: colorPalette.selected | ||
113 | opacity: 0.4 | ||
114 | |||
115 | visible: mouseArea.pressed | ||
116 | } | ||
117 | |||
118 | //border | ||
119 | Rectangle { | ||
120 | anchors { | ||
121 | bottom: parent.bottom | ||
122 | } | ||
123 | |||
124 | height: 1 | ||
125 | width: parent.width | ||
126 | |||
127 | color: "#232629" //FIXME themeable? | ||
128 | opacity: 0.2 | ||
129 | } | ||
130 | } | ||
131 | |||
132 | |||
133 | Avatar { | ||
134 | id: avatar | ||
135 | anchors { | ||
136 | verticalCenter: parent.verticalCenter | ||
137 | left: parent.left | ||
138 | leftMargin: unit.width * 4 | ||
139 | } | ||
140 | |||
141 | width: unit.width * 15 | ||
142 | height: unit.width * 15 | ||
143 | |||
144 | name: model.senderName | ||
145 | |||
146 | } | ||
147 | |||
148 | Label { | ||
149 | id: senderName | ||
150 | |||
151 | anchors { | ||
152 | top: avatar.top | ||
153 | left: avatar.right | ||
154 | right: parent.right | ||
155 | leftMargin: unit.width * 2 | ||
156 | rightMargin: unit.width * 2 | ||
157 | } | ||
158 | |||
159 | text: model.senderName | ||
160 | |||
161 | font.pointSize: 12 //FIXME ? | ||
162 | } | ||
163 | |||
164 | Label { | ||
165 | id: subject | ||
166 | |||
167 | anchors { | ||
168 | top: senderName.bottom | ||
169 | left: senderName.left | ||
170 | right: parent.right | ||
171 | |||
172 | topMargin: unit.width * 2 | ||
173 | rightMargin: unit.width * 2 | ||
174 | } | ||
175 | |||
176 | text: model.subject | ||
177 | |||
178 | font.weight: Font.DemiBold | ||
179 | } | ||
180 | |||
181 | Label { | ||
182 | id: date | ||
183 | |||
184 | anchors { | ||
185 | top: avatar.top | ||
186 | right: parent.right | ||
187 | rightMargin: unit.width * 2 | ||
188 | } | ||
189 | |||
190 | text: model.date | ||
191 | |||
192 | font.weight: Font.Light | ||
193 | font.italic: true | ||
194 | } | ||
195 | } | ||
196 | } | ||
197 | } | ||
diff --git a/applications/kube-mail-mobile/SingleMailView.qml b/applications/kube-mail-mobile/SingleMailView.qml deleted file mode 100644 index ae184c4a..00000000 --- a/applications/kube-mail-mobile/SingleMailView.qml +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | Item { | ||
23 | id: root | ||
24 | |||
25 | property StackView stack; | ||
26 | property string mailId; | ||
27 | |||
28 | //toolbar | ||
29 | ToolBar { | ||
30 | id: toolBar | ||
31 | |||
32 | RowLayout { | ||
33 | |||
34 | width: parent.width | ||
35 | |||
36 | spacing: unit.width * 8 | ||
37 | |||
38 | ToolButton { | ||
39 | iconName: "go-previous" | ||
40 | |||
41 | onClicked: stack.pop() | ||
42 | } | ||
43 | |||
44 | //FIXME | ||
45 | Row { | ||
46 | anchors.horizontalCenter: parent.horizontalCenter | ||
47 | |||
48 | spacing: unit.width * 8 | ||
49 | |||
50 | ToolButton { | ||
51 | iconName: "mail-mark-unread-new" | ||
52 | } | ||
53 | ToolButton { | ||
54 | iconName: "mail-mark-important" | ||
55 | } | ||
56 | ToolButton { | ||
57 | iconName: "user-trash" | ||
58 | } | ||
59 | } | ||
60 | |||
61 | ToolButton { | ||
62 | |||
63 | anchors.right: parent.right | ||
64 | |||
65 | iconName: "mail-reply-sender" | ||
66 | |||
67 | onClicked: stack.push({"item": Qt.resolvedUrl("ComposerView.qml"), properties: {stack: stack}}) | ||
68 | } | ||
69 | } | ||
70 | } | ||
71 | |||
72 | //main content | ||
73 | Item { | ||
74 | |||
75 | anchors { | ||
76 | top: toolBar.bottom | ||
77 | right: parent.right | ||
78 | left: parent.left | ||
79 | bottom: parent.bottom | ||
80 | } | ||
81 | |||
82 | Item { | ||
83 | id: model | ||
84 | property string subject: "We need more Food" | ||
85 | property string sender: "Alice Trump" | ||
86 | property string senderAddress: "alice@wonderland.net" | ||
87 | property string cc: "vdg@kde.org; ross@ccmail.com" | ||
88 | property string time: "2 days ago" | ||
89 | 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 rutrum consectetur dapibus. Fusce hendrerit pulvinar lacinia. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent 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" | ||
90 | } | ||
91 | |||
92 | Rectangle { | ||
93 | id: background | ||
94 | |||
95 | anchors.fill: parent | ||
96 | |||
97 | color: colorPalette.background | ||
98 | } | ||
99 | |||
100 | Item { | ||
101 | anchors { | ||
102 | fill: parent | ||
103 | margins: unit.width * 10 | ||
104 | } | ||
105 | |||
106 | Column { | ||
107 | id: content | ||
108 | |||
109 | width: parent.width | ||
110 | |||
111 | spacing: unit.width * 5 | ||
112 | |||
113 | |||
114 | Label { | ||
115 | text: model.subject | ||
116 | |||
117 | font.pixelSize: 22 // Fixme | ||
118 | } | ||
119 | |||
120 | //FIXME use propper avatar or avatar replacement | ||
121 | //Rectangle { | ||
122 | |||
123 | Item { | ||
124 | height: avatar.height | ||
125 | width: parent.width | ||
126 | |||
127 | Avatar { | ||
128 | id: avatar | ||
129 | |||
130 | width: unit.width * 15 | ||
131 | height: unit.width * 15 | ||
132 | |||
133 | name: model.sender | ||
134 | } | ||
135 | |||
136 | Label { | ||
137 | |||
138 | anchors { | ||
139 | left: avatar.right | ||
140 | top: avatar.top | ||
141 | leftMargin: unit.width * 3 | ||
142 | } | ||
143 | |||
144 | text: model.senderAddress | ||
145 | } | ||
146 | |||
147 | Label { | ||
148 | anchors { | ||
149 | left: avatar.right | ||
150 | bottom: avatar.bottom | ||
151 | leftMargin: unit.width * 3 | ||
152 | } | ||
153 | |||
154 | text: "CC: " + model.cc | ||
155 | |||
156 | } | ||
157 | } | ||
158 | |||
159 | Label { | ||
160 | |||
161 | width: parent.width | ||
162 | |||
163 | wrapMode: Text.WordWrap | ||
164 | |||
165 | text: model.body | ||
166 | |||
167 | } | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | } | ||
diff --git a/applications/kube-mail-mobile/main.qml b/applications/kube-mail-mobile/main.qml deleted file mode 100644 index 914a21d5..00000000 --- a/applications/kube-mail-mobile/main.qml +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 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 | ||
20 | import QtQuick.Layouts 1.1 | ||
21 | |||
22 | ApplicationWindow { | ||
23 | id: app | ||
24 | |||
25 | //FIXME remove fixed pixel hight | ||
26 | //for now just convinience during testing | ||
27 | width: 1080 / 2.7 | ||
28 | height: (1920 - 40)/ 2.7 | ||
29 | |||
30 | visible: true | ||
31 | |||
32 | StackView { | ||
33 | id: stack | ||
34 | |||
35 | anchors.fill: parent | ||
36 | |||
37 | //TODO set sink folderId property | ||
38 | initialItem: {"item": Qt.resolvedUrl("FolderListView.qml"),properties: {stack: stack}} | ||
39 | } | ||
40 | |||
41 | //FIXME use whatever the plasma standart is | ||
42 | Label { | ||
43 | id: unit | ||
44 | |||
45 | text: " " | ||
46 | } | ||
47 | |||
48 | ColorPalette { | ||
49 | id: colorPalette | ||
50 | } | ||
51 | } \ No newline at end of file | ||