From 3062b2ca467a0b428827ffbe93de3ba86ec15a5e Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Sat, 5 Nov 2016 14:16:56 +0100 Subject: implement maillist delegate changes as dicussed with jens --- components/package/contents/ui/MailListView.qml | 105 ++++++++++++++++-------- 1 file changed, 73 insertions(+), 32 deletions(-) (limited to 'components/package') diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index d3afc9b1..0d289569 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml @@ -54,6 +54,7 @@ Controls.ScrollView { id: mailListDelegate width: listView.width + height: Kirigami.Units.gridUnit * 4 enabled: true supportsMouseEvents: true @@ -66,7 +67,7 @@ Controls.ScrollView { //Content Item { width: parent.width - height: Kirigami.Units.gridUnit * 4 + height: parent.height QtQml.Binding { target: root @@ -81,56 +82,96 @@ Controls.ScrollView { value: model.draft } - RowLayout { + //TODO implement bulk action + // Controls.CheckBox { + // visible: mailListDelegate.containsMouse == true + // } + Column { anchors { - top: parent.top - bottom: parent.bottom + verticalCenter: parent.verticalCenter left: parent.left + leftMargin: Kirigami.Units.largeSpacing } - Avatar { - id: avatar - - height: textItem.height - width: height + Text{ + text: model.subject + color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor + } - name: model.senderName + Text { + text: model.senderName + font.italic: true + color: Kirigami.Theme.textColor } + } - ColumnLayout { - id: textItem - height: Kirigami.Units.gridUnit * 3 + Text { + anchors { + right: parent.right + bottom: parent.bottom + } + text: Qt.formatDateTime(model.date) + font.italic: true + color: Kirigami.Theme.textColor + opacity: 0.5 + font.pointSize: 9 + } - Text{ - text: model.subject + Rectangle { - color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor - font.weight: model.unread || model.important ? Font.DemiBold : Font.Normal - } + anchors { + right: parent.right + } - Text { - text: model.senderName + height: Kirigami.Units.gridUnit * 1.2 + width: height - color: Kirigami.Theme.textColor - } + visible: !mailListDelegate.checked - Text { - text: Qt.formatDateTime(model.date) + radius: 80 + color: model.unread ? "#1d99f3" : "lightgrey" - font.weight: Font.Light - opacity: 0.5 - color: Kirigami.Theme.textColor - } - } Text { - text: model.threadSize + anchors.centerIn: parent - font.weight: Font.Light - color: Kirigami.Theme.textColor + text: model.threadSize + color: "white" } + } } + /* + * Text{ + * text: model.subject + * + * color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor + * font.weight: model.unread || model.important ? Font.DemiBold : Font.Normal + } + + Text { + text: model.senderName + + color: Kirigami.Theme.textColor + } + + Text { + text: Qt.formatDateTime(model.date) + + font.weight: Font.Light + opacity: 0.5 + color: Kirigami.Theme.textColor + } + } + Text { + text: model.threadSize + + font.weight: Font.Light + color: Kirigami.Theme.textColor + } + + } + */ } } } -- cgit v1.2.3