diff options
-rw-r--r-- | components/package/contents/ui/MailListView.qml | 105 |
1 files changed, 73 insertions, 32 deletions
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 { | |||
54 | id: mailListDelegate | 54 | id: mailListDelegate |
55 | 55 | ||
56 | width: listView.width | 56 | width: listView.width |
57 | height: Kirigami.Units.gridUnit * 4 | ||
57 | 58 | ||
58 | enabled: true | 59 | enabled: true |
59 | supportsMouseEvents: true | 60 | supportsMouseEvents: true |
@@ -66,7 +67,7 @@ Controls.ScrollView { | |||
66 | //Content | 67 | //Content |
67 | Item { | 68 | Item { |
68 | width: parent.width | 69 | width: parent.width |
69 | height: Kirigami.Units.gridUnit * 4 | 70 | height: parent.height |
70 | 71 | ||
71 | QtQml.Binding { | 72 | QtQml.Binding { |
72 | target: root | 73 | target: root |
@@ -81,56 +82,96 @@ Controls.ScrollView { | |||
81 | value: model.draft | 82 | value: model.draft |
82 | } | 83 | } |
83 | 84 | ||
84 | RowLayout { | 85 | //TODO implement bulk action |
86 | // Controls.CheckBox { | ||
87 | // visible: mailListDelegate.containsMouse == true | ||
88 | // } | ||
85 | 89 | ||
90 | Column { | ||
86 | anchors { | 91 | anchors { |
87 | top: parent.top | 92 | verticalCenter: parent.verticalCenter |
88 | bottom: parent.bottom | ||
89 | left: parent.left | 93 | left: parent.left |
94 | leftMargin: Kirigami.Units.largeSpacing | ||
90 | } | 95 | } |
91 | 96 | ||
92 | Avatar { | 97 | Text{ |
93 | id: avatar | 98 | text: model.subject |
94 | 99 | color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor | |
95 | height: textItem.height | 100 | } |
96 | width: height | ||
97 | 101 | ||
98 | name: model.senderName | 102 | Text { |
103 | text: model.senderName | ||
104 | font.italic: true | ||
105 | color: Kirigami.Theme.textColor | ||
99 | } | 106 | } |
107 | } | ||
100 | 108 | ||
101 | ColumnLayout { | 109 | Text { |
102 | id: textItem | 110 | anchors { |
103 | height: Kirigami.Units.gridUnit * 3 | 111 | right: parent.right |
112 | bottom: parent.bottom | ||
113 | } | ||
114 | text: Qt.formatDateTime(model.date) | ||
115 | font.italic: true | ||
116 | color: Kirigami.Theme.textColor | ||
117 | opacity: 0.5 | ||
118 | font.pointSize: 9 | ||
119 | } | ||
104 | 120 | ||
105 | Text{ | 121 | Rectangle { |
106 | text: model.subject | ||
107 | 122 | ||
108 | color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor | 123 | anchors { |
109 | font.weight: model.unread || model.important ? Font.DemiBold : Font.Normal | 124 | right: parent.right |
110 | } | 125 | } |
111 | 126 | ||
112 | Text { | 127 | height: Kirigami.Units.gridUnit * 1.2 |
113 | text: model.senderName | 128 | width: height |
114 | 129 | ||
115 | color: Kirigami.Theme.textColor | 130 | visible: !mailListDelegate.checked |
116 | } | ||
117 | 131 | ||
118 | Text { | 132 | radius: 80 |
119 | text: Qt.formatDateTime(model.date) | 133 | color: model.unread ? "#1d99f3" : "lightgrey" |
120 | 134 | ||
121 | font.weight: Font.Light | ||
122 | opacity: 0.5 | ||
123 | color: Kirigami.Theme.textColor | ||
124 | } | ||
125 | } | ||
126 | Text { | 135 | Text { |
127 | text: model.threadSize | 136 | anchors.centerIn: parent |
128 | 137 | ||
129 | font.weight: Font.Light | 138 | text: model.threadSize |
130 | color: Kirigami.Theme.textColor | 139 | color: "white" |
131 | } | 140 | } |
141 | |||
132 | } | 142 | } |
133 | } | 143 | } |
144 | /* | ||
145 | * Text{ | ||
146 | * text: model.subject | ||
147 | * | ||
148 | * color: mailListDelegate.checked ? Kirigami.Theme.textColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor | ||
149 | * font.weight: model.unread || model.important ? Font.DemiBold : Font.Normal | ||
150 | } | ||
151 | |||
152 | Text { | ||
153 | text: model.senderName | ||
154 | |||
155 | color: Kirigami.Theme.textColor | ||
156 | } | ||
157 | |||
158 | Text { | ||
159 | text: Qt.formatDateTime(model.date) | ||
160 | |||
161 | font.weight: Font.Light | ||
162 | opacity: 0.5 | ||
163 | color: Kirigami.Theme.textColor | ||
164 | } | ||
165 | } | ||
166 | Text { | ||
167 | text: model.threadSize | ||
168 | |||
169 | font.weight: Font.Light | ||
170 | color: Kirigami.Theme.textColor | ||
171 | } | ||
172 | |||
173 | } | ||
174 | */ | ||
134 | } | 175 | } |
135 | } | 176 | } |
136 | } | 177 | } |