diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-08-30 08:40:58 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-08-30 08:40:58 +0200 |
commit | d171a3b185565c75b4fa55d114f645c7dc8f91d8 (patch) | |
tree | 44a19b6db026da26d7ee014a8614a24943bc7120 | |
parent | 5a85ea7a7d78ab75945c3a47bfa483107ac8f184 (diff) | |
download | kube-d171a3b185565c75b4fa55d114f645c7dc8f91d8.tar.gz kube-d171a3b185565c75b4fa55d114f645c7dc8f91d8.zip |
composer attachements: deal with long attachment lists
-rw-r--r-- | components/kube/contents/ui/ComposerView.qml | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index 4d8b437a..0a517e03 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml | |||
@@ -242,27 +242,14 @@ Kube.View { | |||
242 | onActiveFocusChanged: closeFirstSplitIfNecessary() | 242 | onActiveFocusChanged: closeFirstSplitIfNecessary() |
243 | } | 243 | } |
244 | 244 | ||
245 | Row { | 245 | Flow { |
246 | id: attachments | ||
247 | |||
246 | Layout.fillWidth: true | 248 | Layout.fillWidth: true |
247 | spacing: Kube.Units.largeSpacing | 249 | layoutDirection: Qt.RightToLeft |
248 | Flow { | 250 | spacing: Kube.Units.smallSpacing |
249 | id: attachments | 251 | clip: true |
250 | 252 | ||
251 | layoutDirection: Qt.RightToLeft | ||
252 | spacing: Kube.Units.smallSpacing | ||
253 | clip: true | ||
254 | |||
255 | Repeater { | ||
256 | model: composerController.attachmentModel | ||
257 | delegate: Kube.AttachmentDelegate { | ||
258 | name: model.filename | ||
259 | icon: model.iconName | ||
260 | clip: true | ||
261 | actionIcon: Kube.Icons.remove | ||
262 | onExecute: composerController.removeAttachment(model.url) | ||
263 | } | ||
264 | } | ||
265 | } | ||
266 | Kube.Button { | 253 | Kube.Button { |
267 | text: qsTr("Attach file") | 254 | text: qsTr("Attach file") |
268 | 255 | ||
@@ -283,6 +270,17 @@ Kube.View { | |||
283 | } | 270 | } |
284 | } | 271 | } |
285 | } | 272 | } |
273 | |||
274 | Repeater { | ||
275 | model: composerController.attachmentModel | ||
276 | delegate: Kube.AttachmentDelegate { | ||
277 | name: model.filename | ||
278 | icon: model.iconName | ||
279 | clip: true | ||
280 | actionIcon: Kube.Icons.remove | ||
281 | onExecute: composerController.removeAttachment(model.url) | ||
282 | } | ||
283 | } | ||
286 | } | 284 | } |
287 | 285 | ||
288 | Kube.TextEditor { | 286 | Kube.TextEditor { |