diff options
Diffstat (limited to 'components/package/contents/ui')
-rw-r--r-- | components/package/contents/ui/SingleMailView.qml | 179 |
1 files changed, 100 insertions, 79 deletions
diff --git a/components/package/contents/ui/SingleMailView.qml b/components/package/contents/ui/SingleMailView.qml index 7ccbdb19..5872d4b5 100644 --- a/components/package/contents/ui/SingleMailView.qml +++ b/components/package/contents/ui/SingleMailView.qml | |||
@@ -119,112 +119,121 @@ Item { | |||
119 | 119 | ||
120 | color: Kirigami.Theme.viewBackgroundColor | 120 | color: Kirigami.Theme.viewBackgroundColor |
121 | 121 | ||
122 | //TODO bookmark | ||
123 | /* | ||
124 | * Contorls1.ToolButton { | ||
125 | * iconName: "bookmark-new" | ||
126 | * | ||
127 | } | ||
128 | */ | ||
129 | //BEGIN header | 122 | //BEGIN header |
130 | Item { | 123 | Item { |
131 | id: header | 124 | id: header |
132 | 125 | ||
133 | height: Kirigami.Units.gridUnit * 5 | 126 | anchors { |
134 | width: parent.width | 127 | top: parent.top |
128 | left: parent.left | ||
129 | right: parent.right | ||
130 | margins: Kirigami.Units.largeSpacing | ||
131 | } | ||
132 | |||
133 | height: from.height + to.height + Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing | ||
134 | |||
135 | Avatar { | ||
136 | id: avatar | ||
135 | 137 | ||
136 | Row { | ||
137 | id: headerContent | ||
138 | anchors { | 138 | anchors { |
139 | left: seperator.left | 139 | top: parent.top |
140 | bottom: seperator.top | 140 | topMargin: Kirigami.Units.smallSpacing |
141 | bottomMargin: height * 0.25 | ||
142 | } | 141 | } |
143 | 142 | ||
144 | spacing: Kirigami.Units.largeSpacing / 2 | 143 | height: Kirigami.Units.gridUnit * 2.5 |
144 | width: height | ||
145 | 145 | ||
146 | Avatar { | 146 | name: model.senderName |
147 | id: avatar | 147 | } |
148 | 148 | ||
149 | height: Kirigami.Units.gridUnit * 2.5 | 149 | Row{ |
150 | width: height | 150 | id: from |
151 | 151 | ||
152 | name: model.senderName | 152 | anchors { |
153 | top: avatar.top | ||
154 | left: avatar.right | ||
155 | leftMargin: Kirigami.Units.smallSpacing * 2 | ||
156 | topMargin: Kirigami.Units.smallSpacing | ||
153 | } | 157 | } |
154 | 158 | ||
155 | ColumnLayout { | 159 | width: parent.width - avatar.width - Kirigami.Units.largeSpacing * 3 |
156 | 160 | ||
157 | RowLayout { | 161 | spacing: Kirigami.Units.smallSpacing |
158 | 162 | clip: true | |
159 | Text { | 163 | |
160 | text: model.senderName | 164 | Text { |
161 | 165 | id: senderName | |
162 | font.weight: Font.DemiBold | 166 | |
163 | color: Kirigami.Theme.textColor | 167 | text: model.senderName |
164 | opacity: 0.75 | 168 | |
165 | } | 169 | font.weight: Font.DemiBold |
166 | 170 | color: Kirigami.Theme.textColor | |
167 | Text { | 171 | opacity: 0.75 |
168 | text: model.sender | 172 | } |
169 | 173 | ||
170 | color: Kirigami.Theme.textColor | 174 | Text { |
171 | opacity: 0.75 | 175 | |
172 | } | 176 | width: parent.width - senderName.width - Kirigami.Units.smallSpacing |
173 | } | 177 | |
174 | 178 | text: model.sender | |
175 | RowLayout { | 179 | |
176 | Kirigami.Label { | 180 | color: Kirigami.Theme.textColor |
177 | text: "To:" | 181 | opacity: 0.75 |
178 | } | 182 | |
179 | Text { | 183 | elide: Text.ElideRight |
180 | text: model.to | ||
181 | |||
182 | color: Kirigami.Theme.textColor | ||
183 | opacity: 0.75 | ||
184 | } | ||
185 | Text { | ||
186 | text: model.cc | ||
187 | |||
188 | color: Kirigami.Theme.textColor | ||
189 | opacity: 0.75 | ||
190 | } | ||
191 | Text { | ||
192 | text: model.bcc | ||
193 | |||
194 | color: Kirigami.Theme.textColor | ||
195 | opacity: 0.75 | ||
196 | } | ||
197 | } | ||
198 | } | 184 | } |
199 | } | 185 | } |
200 | 186 | ||
201 | Text { | 187 | Text { |
188 | id: to_label | ||
202 | 189 | ||
203 | anchors { | 190 | anchors { |
204 | right: seperator.right | 191 | top: from.bottom |
205 | bottom: headerContent.top | 192 | left: avatar.right |
193 | leftMargin: Kirigami.Units.smallSpacing * 2 | ||
194 | topMargin: Kirigami.Units.smallSpacing * 0.5 | ||
206 | } | 195 | } |
207 | 196 | ||
208 | text: Qt.formatDateTime(model.date, "dd MMM yyyy hh:mm") | 197 | text: "to:" |
209 | 198 | ||
210 | font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.7 | ||
211 | color: Kirigami.Theme.textColor | 199 | color: Kirigami.Theme.textColor |
212 | opacity: 0.75 | 200 | opacity: 0.75 |
213 | } | 201 | } |
214 | 202 | ||
215 | Rectangle { | 203 | Text { |
216 | id: seperator | 204 | id: to |
217 | 205 | ||
218 | anchors { | 206 | anchors { |
219 | bottom: parent.bottom | 207 | top: to_label.top |
220 | horizontalCenter: parent.horizontalCenter | 208 | left: to_label.right |
209 | leftMargin: Kirigami.Units.smallSpacing | ||
221 | } | 210 | } |
222 | 211 | ||
223 | width: parent.width - Kirigami.Units.gridUnit * 2 | 212 | width: parent.width - avatar.width - to_label.width - Kirigami.Units.largeSpacing * 2 |
224 | height: 1 | 213 | |
214 | text: model.to + " " + model.cc + " " + model.bcc | ||
215 | |||
216 | maximumLineCount: 3 | ||
217 | wrapMode: Text.WrapAnywhere | ||
218 | elide: Text.ElideRight | ||
225 | 219 | ||
226 | color: Kirigami.Theme.textColor | 220 | color: Kirigami.Theme.textColor |
227 | opacity: 0.5 | 221 | opacity: 0.75 |
222 | clip: true | ||
223 | } | ||
224 | |||
225 | Text { | ||
226 | |||
227 | anchors { | ||
228 | right: seperator.right | ||
229 | bottom: headerContent.top | ||
230 | } | ||
231 | |||
232 | text: Qt.formatDateTime(model.date, "dd MMM yyyy hh:mm") | ||
233 | |||
234 | font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.7 | ||
235 | color: Kirigami.Theme.textColor | ||
236 | opacity: 0.75 | ||
228 | } | 237 | } |
229 | 238 | ||
230 | Rectangle { | 239 | Rectangle { |
@@ -236,16 +245,28 @@ Item { | |||
236 | height: Kirigami.Units.gridUnit | 245 | height: Kirigami.Units.gridUnit |
237 | width: height | 246 | width: height |
238 | 247 | ||
239 | color: Kirigami.Theme.textColor | 248 | color: Kirigami.Theme.backgroundColor |
240 | opacity: 0.5 | ||
241 | 249 | ||
242 | Controls1.ToolButton { | 250 | Controls1.ToolButton { |
243 | anchors.fill: parent | 251 | anchors.fill: parent |
244 | 252 | ||
245 | onClicked: { | 253 | iconName: "go-down" |
246 | console.error(model.mimeMessage) | 254 | } |
247 | } | 255 | } |
256 | |||
257 | Rectangle { | ||
258 | id: seperator | ||
259 | |||
260 | anchors { | ||
261 | left: parent.left | ||
262 | right: parent.right | ||
263 | bottom: parent.bottom | ||
248 | } | 264 | } |
265 | |||
266 | height: 1 | ||
267 | |||
268 | color: Kirigami.Theme.textColor | ||
269 | opacity: 0.5 | ||
249 | } | 270 | } |
250 | } | 271 | } |
251 | //END header | 272 | //END header |