summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-04-23 18:21:51 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-04-23 18:21:51 +0200
commitb9590bf688a5792e38a834676fa7ce0dc6a57900 (patch)
treee3ee423d7155acf92167ec9686bada01c22a7ada /components/package/contents/ui
parentdb61dfe6fcbb4e316f73fe09e914493999d619e6 (diff)
downloadkube-b9590bf688a5792e38a834676fa7ce0dc6a57900.tar.gz
kube-b9590bf688a5792e38a834676fa7ce0dc6a57900.zip
brush up mailListDelegate according to VDGs suggestions
Diffstat (limited to 'components/package/contents/ui')
-rw-r--r--components/package/contents/ui/MailListView.qml83
1 files changed, 64 insertions, 19 deletions
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml
index 01c9b68b..75162c39 100644
--- a/components/package/contents/ui/MailListView.qml
+++ b/components/package/contents/ui/MailListView.qml
@@ -45,47 +45,92 @@ Controls.ScrollView {
45 focus: true 45 focus: true
46 46
47 delegate: Kirigami.AbstractListItem { 47 delegate: Kirigami.AbstractListItem {
48 id: mailListDelegate
49
48 width: listView.width 50 width: listView.width
49 height: Unit.size * 12
50 51
51 enabled: true 52 enabled: true
52 supportsMouseEvents: true 53 supportsMouseEvents: true
53 checked: listView.currentIndex == index
54 54
55 checked: listView.currentIndex == index
55 onClicked: { 56 onClicked: {
56 listView.currentIndex = model.index 57 listView.currentIndex = model.index
57 root.currentMail = model.domainObject 58 root.currentMail = model.domainObject
58 } 59 }
59 60
60 RowLayout { 61 //Content
61 Avatar { 62 Item {
62 id: avatar 63 width: parent.width
64 height: Kirigami.Units.gridUnit * 4
63 65
64 height: Unit.size * 9 66 RowLayout {
65 width: height
66 67
67 name: model.senderName 68 anchors {
68 } 69 top: parent.top
70 bottom: parent.bottom
71 left: parent.left
72 }
69 73
70 ColumnLayout { 74 Avatar {
75 id: avatar
71 76
72 Kirigami.Label { 77 height: textItem.height
73 text: model.senderName 78 width: height
74 79
75 font.weight: Font.DemiBold 80 name: model.senderName
76 } 81 }
77 82
78 Kirigami.Label { 83 ColumnLayout {
79 text: model.subject 84 id: textItem
80 } 85 height: Kirigami.Units.gridUnit * 3
86
87 Text{
88 text: model.subject
89
90 color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor
91 font.weight: model.unread || model.important ? Font.DemiBold : Font.Normal
92 }
93
94 Text {
95 text: model.senderName
96
97 color: Kirigami.Theme.textColor
98 }
81 99
82 Kirigami.Label { 100 Text {
83 text: Qt.formatDateTime(model.date) 101 text: Qt.formatDateTime(model.date)
84 102
85 font.weight: Font.Light 103 font.weight: Font.Light
104
105 opacity: 0.5
106 }
86 } 107 }
87 } 108 }
88 109
110 Rectangle {
111
112 anchors {
113 right: parent.right
114 bottom: parent.bottom
115 bottomMargin: 5
116 }
117
118 color: "lightgrey" //TODO wait for Kirigami pallete update
119
120 height: Kirigami.Units.gridUnit * 2
121 width: height
122
123 visible: mailListDelegate.checked ? false : model.unread
124
125 radius: 100
126
127 Text {
128 anchors.centerIn: parent
129 text: "+1" //TODO wait for thread implementation
130 color: Kirigami.Theme.complementaryTextColor
131 font.weight: Font.DemiBold
132 }
133 }
89 } 134 }
90 } 135 }
91 } 136 }