From 6d2b4f84b0efdb6b1d6c207ed2ab6fc06c140ab8 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 15 Jun 2016 18:32:54 +0200 Subject: add add account / sync / edit account buttons --- components/mail/contents/ui/main.qml | 78 ++++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 26 deletions(-) (limited to 'components/mail/contents/ui/main.qml') diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 7b318991..4d60e71b 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml @@ -157,21 +157,65 @@ ApplicationWindow { width: 600 color: "lightgrey" //FIXME create a propper dialog thingy - clip: true + Item { + id: footer + + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + margins: Kirigami.Units.largeSpacing + } + + height: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 1 + width: listView.width + + Button { + + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + } + + text: "Create new Account" + } + + Button { + + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + } + + iconName: "view-refresh" + text: "Sync" + enabled: syncAction.ready + + onClicked: { + syncAction.execute() + } + } + } + ListView { id: listView - anchors.fill: parent - - footer: Button { - text: "Create new Account" + anchors { + top: parent.top + bottom: footer.top + left: parent.left + right: parent.right } + clip: true + model: KubeFramework.AccountsModel { } delegate: Kirigami.AbstractListItem { + id: accountDelegate + enabled: true supportsMouseEvents: true @@ -200,8 +244,6 @@ ApplicationWindow { Label { text: model.name === "" ? accountFactory.name : model.name } - - } Button { @@ -210,34 +252,18 @@ ApplicationWindow { margins: Kirigami.Units.largeSpacing } - + visible: accountDelegate.containsMouse text: "edit" } } } } - } - } /* - * KubeComponents.AccountSwitcher { - * Layout.fillHeight: true - * Layout.fillWidth: true - } - - - ToolButton { - iconName: "view-refresh" - text: "Sync" - enabled: syncAction.ready - - onClicked: { - syncAction.execute() - } - } - */ + * + */ } //END Folderlist section -- cgit v1.2.3