From d171a3b185565c75b4fa55d114f645c7dc8f91d8 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 30 Aug 2017 08:40:58 +0200 Subject: composer attachements: deal with long attachment lists --- components/kube/contents/ui/ComposerView.qml | 38 +++++++++++++--------------- 1 file 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 { onActiveFocusChanged: closeFirstSplitIfNecessary() } - Row { + Flow { + id: attachments + Layout.fillWidth: true - spacing: Kube.Units.largeSpacing - Flow { - id: attachments - - layoutDirection: Qt.RightToLeft - spacing: Kube.Units.smallSpacing - clip: true - - Repeater { - model: composerController.attachmentModel - delegate: Kube.AttachmentDelegate { - name: model.filename - icon: model.iconName - clip: true - actionIcon: Kube.Icons.remove - onExecute: composerController.removeAttachment(model.url) - } - } - } + layoutDirection: Qt.RightToLeft + spacing: Kube.Units.smallSpacing + clip: true + Kube.Button { text: qsTr("Attach file") @@ -283,6 +270,17 @@ Kube.View { } } } + + Repeater { + model: composerController.attachmentModel + delegate: Kube.AttachmentDelegate { + name: model.filename + icon: model.iconName + clip: true + actionIcon: Kube.Icons.remove + onExecute: composerController.removeAttachment(model.url) + } + } } Kube.TextEditor { -- cgit v1.2.3