From f0fc0f9720610adde4e7f08625fdf3fe81de8de2 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Mon, 5 Sep 2016 14:13:07 +0200 Subject: adjust outbox height to number of mails in outbox --- components/package/contents/ui/Outbox.qml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'components/package/contents/ui') diff --git a/components/package/contents/ui/Outbox.qml b/components/package/contents/ui/Outbox.qml index 4baa0eae..ff049683 100644 --- a/components/package/contents/ui/Outbox.qml +++ b/components/package/contents/ui/Outbox.qml @@ -38,13 +38,15 @@ ToolButton { Rectangle { id: dialog + property int modelCount: 5 //FIXME replace with actual model + anchors { top: parent.bottom horizontalCenter: parent.horizontalCenter } - height: Kirigami.Units.gridUnit * 15 - width: Kirigami.Units.gridUnit * 12 + height: modelCount * Kirigami.Units.gridUnit * 3 + 10//scrollView.height height: Kirigami.Units.gridUnit * 15 + width: Kirigami.Units.gridUnit * 12 color: Kirigami.Theme.backgroundColor border.width: 1 @@ -55,16 +57,22 @@ ToolButton { //BEGIN Dialog Content ScrollView { + id: scrollView + anchors { fill: parent - margins: 1 + margins: 5 } + ListView { id: listView - model: 3 + model: 5 delegate: Kirigami.AbstractListItem { + + height: Kirigami.Units.gridUnit * 3 + Kirigami.Label { anchors.centerIn: parent text: "Subjext subxetson" -- cgit v1.2.3