diff options
Diffstat (limited to 'components/mailviewer/contents/ui/MailDataModel.qml')
-rw-r--r-- | components/mailviewer/contents/ui/MailDataModel.qml | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/components/mailviewer/contents/ui/MailDataModel.qml b/components/mailviewer/contents/ui/MailDataModel.qml index 99bd0dc2..46427194 100644 --- a/components/mailviewer/contents/ui/MailDataModel.qml +++ b/components/mailviewer/contents/ui/MailDataModel.qml | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
20 | import QtQml.Models 2.2 | 20 | import QtQml.Models 2.2 |
21 | import org.kube.framework 1.0 as Kube | ||
21 | 22 | ||
22 | DelegateModel { | 23 | DelegateModel { |
23 | id: mailDataModel | 24 | id: mailDataModel |
@@ -25,16 +26,38 @@ DelegateModel { | |||
25 | 26 | ||
26 | delegate: Item { | 27 | delegate: Item { |
27 | id: partColumn | 28 | id: partColumn |
29 | |||
28 | width: parent.width | 30 | width: parent.width |
29 | height: childrenRect.height | 31 | height: childrenRect.height |
30 | Loader { | 32 | |
31 | id: partLoader | 33 | Row { |
32 | anchors { | 34 | anchors { |
33 | top: parent.top | 35 | top: parent.top |
34 | left: parent.left | 36 | left: parent.left |
37 | right: parent.right | ||
38 | } | ||
39 | height: partLoader.height | ||
40 | spacing: Kube.Units.smallSpacing | ||
41 | Rectangle { | ||
42 | id: border | ||
43 | visible: model.encrypted || model.signed | ||
44 | anchors { | ||
45 | top: parent.top | ||
46 | bottom: parent.bottom | ||
47 | } | ||
48 | width: Kube.Units.smallSpacing | ||
49 | color: Kube.Colors.positiveColor | ||
50 | opacity: 0.5 | ||
51 | } | ||
52 | |||
53 | Loader { | ||
54 | id: partLoader | ||
55 | anchors { | ||
56 | top: parent.top | ||
57 | } | ||
58 | height: item? item.contentHeight : 0 | ||
59 | width: parent.width | ||
35 | } | 60 | } |
36 | height: item? item.contentHeight : 0 | ||
37 | width: parent.width | ||
38 | } | 61 | } |
39 | Component.onCompleted: { | 62 | Component.onCompleted: { |
40 | switch (model.type) { | 63 | switch (model.type) { |
@@ -42,14 +65,12 @@ DelegateModel { | |||
42 | partLoader.setSource("TextContent.qml", | 65 | partLoader.setSource("TextContent.qml", |
43 | {"content": model.content, | 66 | {"content": model.content, |
44 | "embedded": model.embeded, | 67 | "embedded": model.embeded, |
45 | "securityLevel": model.securityLevel, | ||
46 | "type": model.type, | 68 | "type": model.type, |
47 | "debug": debug}) | 69 | "debug": debug}) |
48 | break | 70 | break |
49 | case "html": | 71 | case "html": |
50 | partLoader.setSource("HtmlContent.qml", | 72 | partLoader.setSource("HtmlContent.qml", |
51 | {"content": model.content, | 73 | {"content": model.content, |
52 | "securityLevel": model.securityLevel, | ||
53 | "debug": debug}) | 74 | "debug": debug}) |
54 | break; | 75 | break; |
55 | case "error": | 76 | case "error": |