From 9113a562ed639aeeba7b4b1cdeb9768962a6af4e Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Fri, 22 Apr 2016 16:59:00 +0200 Subject: use layouts instead of anchors in the mailListDelegate --- components/package/contents/ui/MailListView.qml | 60 ++++++++----------------- 1 file changed, 18 insertions(+), 42 deletions(-) (limited to 'components/package/contents/ui') diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index efe2b901..291573ed 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml @@ -57,59 +57,35 @@ Controls.ScrollView { root.currentMail = model.domainObject } - Avatar { - id: avatar + RowLayout { + Avatar { + id: avatar - anchors { - verticalCenter: parent.verticalCenter - left: parent.left - leftMargin: Unit.size * 2 - } - - height: Unit.size * 9 - width: height - - name: model.senderName - } - - Controls.Label { - id: senderName + height: Unit.size * 9 + width: height - anchors { - top: avatar.top - left: avatar.right - leftMargin: Unit.size * 3 + name: model.senderName } - text: model.senderName + ColumnLayout { - font.weight: Font.DemiBold - } - - Controls.Label { - id: date + Controls.Label { + text: model.senderName - anchors { - top: avatar.top - right: parent.right - rightMargin: Unit.size * 2 - } + font.weight: Font.DemiBold + } - text: Qt.formatDateTime(model.date) - - font.weight: Font.Light - } + Controls.Label { + text: model.subject + } - Controls.Label { - id: subject + Controls.Label { + text: Qt.formatDateTime(model.date) - anchors { - bottom: avatar.bottom - left: avatar.right - leftMargin: Unit.size * 3 + font.weight: Font.Light + } } - text: model.subject } } } -- cgit v1.2.3