diff options
Diffstat (limited to 'components/mail/contents/ui/main.qml')
-rw-r--r-- | components/mail/contents/ui/main.qml | 112 |
1 files changed, 47 insertions, 65 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 73ed44a8..acee12bf 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -79,26 +79,57 @@ ApplicationWindow { | |||
79 | context: folderListContext | 79 | context: folderListContext |
80 | } | 80 | } |
81 | 81 | ||
82 | SplitView { | ||
83 | anchors { | ||
84 | top: toolbar.bottom | ||
85 | left: app.left | ||
86 | } | ||
87 | |||
88 | height: app.height - toolbar.height | ||
89 | width: app.width | ||
90 | |||
91 | KubeComponents.FolderListView { | ||
92 | id: folderListView | ||
93 | width: Kirigami.Units.gridUnit * 10 | ||
94 | Layout.maximumWidth: app.width * 0.25 | ||
95 | Layout.minimumWidth: Kirigami.Units.gridUnit * 5 | ||
96 | } | ||
97 | |||
98 | KubeComponents.MailListView { | ||
99 | id: mailListView | ||
100 | parentFolder: folderListView.currentFolder | ||
101 | width: Kirigami.Units.gridUnit * 20 | ||
102 | Layout.maximumWidth: app.width * 0.4 | ||
103 | Layout.minimumWidth: Kirigami.Units.gridUnit * 10 | ||
104 | focus: true | ||
105 | } | ||
106 | |||
107 | KubeComponents.SingleMailView { | ||
108 | id: mailView | ||
109 | mail: mailListView.currentMail | ||
110 | Layout.fillWidth: true | ||
111 | } | ||
112 | } | ||
113 | |||
82 | ToolBar { | 114 | ToolBar { |
83 | id: toolbar | 115 | id: toolbar |
116 | |||
84 | anchors { | 117 | anchors { |
85 | top: app.top | 118 | top: app.top |
86 | left: app.left | ||
87 | right: app.right | ||
88 | } | 119 | } |
89 | 120 | ||
121 | width: app.width | ||
90 | height: Kirigami.Units.iconSizes.medium + Kirigami.Units.smallSpacing * 2 | 122 | height: Kirigami.Units.iconSizes.medium + Kirigami.Units.smallSpacing * 2 |
91 | //width: app.width | ||
92 | 123 | ||
93 | Row { | 124 | Row { |
94 | anchors.fill: parent | 125 | width: parent.width |
126 | height: parent.height | ||
95 | 127 | ||
96 | spacing: 1 //to account for the SplitView borders | 128 | spacing: 1 //to account for the SplitView borders |
97 | 129 | ||
98 | RowLayout { | 130 | RowLayout { |
99 | height: parent.height | 131 | height: parent.height |
100 | width: folderListView.width - 5 //to adjust for the toolbar spacing | 132 | width: folderListView.width - 5 //to adjust for the toolbar spacing |
101 | clip: true | ||
102 | 133 | ||
103 | KubeComponents.AccountSwitcher { | 134 | KubeComponents.AccountSwitcher { |
104 | Layout.fillHeight: true | 135 | Layout.fillHeight: true |
@@ -106,8 +137,6 @@ ApplicationWindow { | |||
106 | } | 137 | } |
107 | 138 | ||
108 | ToolButton { | 139 | ToolButton { |
109 | height: toolbar.height | ||
110 | width: toolbar.width | ||
111 | iconName: "view-refresh" | 140 | iconName: "view-refresh" |
112 | text: "Sync" | 141 | text: "Sync" |
113 | enabled: syncAction.ready | 142 | enabled: syncAction.ready |
@@ -119,16 +148,17 @@ ApplicationWindow { | |||
119 | } | 148 | } |
120 | 149 | ||
121 | Item { | 150 | Item { |
151 | |||
122 | height: parent.height | 152 | height: parent.height |
123 | width: mailListView.width | 153 | width: mailListView.width |
124 | clip: true | ||
125 | 154 | ||
126 | RowLayout { | 155 | Row { |
156 | |||
127 | anchors.centerIn: parent | 157 | anchors.centerIn: parent |
128 | 158 | ||
159 | spacing: Kirigami.Units.smallSpacing | ||
160 | |||
129 | ToolButton { | 161 | ToolButton { |
130 | height: toolbar.height | ||
131 | width: toolbar.width | ||
132 | iconName: "mail-mark-unread" | 162 | iconName: "mail-mark-unread" |
133 | text: "Mark As Read" | 163 | text: "Mark As Read" |
134 | enabled: markAsReadAction.ready | 164 | enabled: markAsReadAction.ready |
@@ -138,8 +168,6 @@ ApplicationWindow { | |||
138 | } | 168 | } |
139 | 169 | ||
140 | ToolButton { | 170 | ToolButton { |
141 | height: toolbar.height | ||
142 | width: toolbar.width | ||
143 | iconName: "mail-mark-important" | 171 | iconName: "mail-mark-important" |
144 | text: "Mark Important" | 172 | text: "Mark Important" |
145 | enabled: false | 173 | enabled: false |
@@ -148,8 +176,6 @@ ApplicationWindow { | |||
148 | } | 176 | } |
149 | 177 | ||
150 | ToolButton { | 178 | ToolButton { |
151 | height: toolbar.height | ||
152 | width: toolbar.width | ||
153 | iconName: "edit-delete" | 179 | iconName: "edit-delete" |
154 | text: "Delete Mail" | 180 | text: "Delete Mail" |
155 | enabled: deleteAction.ready | 181 | enabled: deleteAction.ready |
@@ -161,9 +187,9 @@ ApplicationWindow { | |||
161 | } | 187 | } |
162 | 188 | ||
163 | RowLayout{ | 189 | RowLayout{ |
190 | |||
164 | height: parent.height | 191 | height: parent.height |
165 | width: mailView.width - 5 //to adjust for the toolbar spacing | 192 | width: mailView.width |
166 | clip: true | ||
167 | 193 | ||
168 | Component { | 194 | Component { |
169 | id: composerComponent | 195 | id: composerComponent |
@@ -191,7 +217,6 @@ ApplicationWindow { | |||
191 | function isReady(context) { | 217 | function isReady(context) { |
192 | return context.mail && context.isDraft; | 218 | return context.mail && context.isDraft; |
193 | } | 219 | } |
194 | |||
195 | function handler(context) { | 220 | function handler(context) { |
196 | var component= composerComponent.createObject(app, {"draftMessage": context.mail}) | 221 | var component= composerComponent.createObject(app, {"draftMessage": context.mail}) |
197 | component.loadMessage(context.mail, true) | 222 | component.loadMessage(context.mail, true) |
@@ -201,9 +226,6 @@ ApplicationWindow { | |||
201 | ToolButton { | 226 | ToolButton { |
202 | id: newMailButton | 227 | id: newMailButton |
203 | 228 | ||
204 | height: toolbar.height | ||
205 | width: toolbar.width | ||
206 | |||
207 | iconName: "mail-message-new" | 229 | iconName: "mail-message-new" |
208 | text: "Compose" | 230 | text: "Compose" |
209 | onClicked: { | 231 | onClicked: { |
@@ -212,8 +234,6 @@ ApplicationWindow { | |||
212 | } | 234 | } |
213 | 235 | ||
214 | ToolButton { | 236 | ToolButton { |
215 | height: toolbar.height | ||
216 | width: toolbar.width | ||
217 | iconName: "mail-message-reply" | 237 | iconName: "mail-message-reply" |
218 | text: "Reply" | 238 | text: "Reply" |
219 | enabled: replyAction.ready | 239 | enabled: replyAction.ready |
@@ -222,9 +242,8 @@ ApplicationWindow { | |||
222 | } | 242 | } |
223 | } | 243 | } |
224 | 244 | ||
245 | /* | ||
225 | ToolButton { | 246 | ToolButton { |
226 | height: toolbar.height | ||
227 | width: toolbar.width | ||
228 | iconName: "mail-message-edit" | 247 | iconName: "mail-message-edit" |
229 | text: "Edit" | 248 | text: "Edit" |
230 | enabled: editAction.ready | 249 | enabled: editAction.ready |
@@ -232,6 +251,7 @@ ApplicationWindow { | |||
232 | editAction.execute() | 251 | editAction.execute() |
233 | } | 252 | } |
234 | } | 253 | } |
254 | */ | ||
235 | 255 | ||
236 | Item { | 256 | Item { |
237 | Layout.fillWidth: true | 257 | Layout.fillWidth: true |
@@ -240,7 +260,7 @@ ApplicationWindow { | |||
240 | TextField { | 260 | TextField { |
241 | id: searchBar | 261 | id: searchBar |
242 | 262 | ||
243 | Layout.minimumWidth: Kirigami.Units.gridUnit * 25 | 263 | Layout.minimumWidth: Kirigami.Units.gridUnit * 10 |
244 | height: toolbar.height | 264 | height: toolbar.height |
245 | 265 | ||
246 | placeholderText: "Search..." | 266 | placeholderText: "Search..." |
@@ -249,9 +269,6 @@ ApplicationWindow { | |||
249 | ToolButton { | 269 | ToolButton { |
250 | id: settingsButton | 270 | id: settingsButton |
251 | 271 | ||
252 | height: toolbar.height | ||
253 | width: toolbar.width | ||
254 | |||
255 | iconName: "application-menu" | 272 | iconName: "application-menu" |
256 | text: "Settings" | 273 | text: "Settings" |
257 | 274 | ||
@@ -270,39 +287,4 @@ ApplicationWindow { | |||
270 | } | 287 | } |
271 | } | 288 | } |
272 | } | 289 | } |
273 | 290 | } \ No newline at end of file | |
274 | SplitView { | ||
275 | anchors { | ||
276 | top: toolbar.bottom | ||
277 | left: app.left | ||
278 | } | ||
279 | |||
280 | height: app.height - toolbar.height | ||
281 | width: app.width | ||
282 | |||
283 | KubeComponents.FolderListView { | ||
284 | id: folderListView | ||
285 | width: Unit.size * 55 | ||
286 | Layout.maximumWidth: Unit.size * 150 | ||
287 | Layout.minimumWidth: Unit.size * 30 | ||
288 | } | ||
289 | |||
290 | KubeComponents.MailListView { | ||
291 | id: mailListView | ||
292 | parentFolder: folderListView.currentFolder | ||
293 | width: Unit.size * 80 | ||
294 | Layout.maximumWidth: Unit.size * 250 | ||
295 | Layout.minimumWidth: Unit.size * 50 | ||
296 | focus: true | ||
297 | } | ||
298 | |||
299 | KubeComponents.SingleMailView { | ||
300 | id: mailView | ||
301 | mail: mailListView.currentMail | ||
302 | Layout.fillWidth: true | ||
303 | } | ||
304 | |||
305 | } | ||
306 | |||
307 | } | ||
308 | |||