summaryrefslogtreecommitdiffstats
path: root/components/mailviewer/contents/ui/MailDataModel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/mailviewer/contents/ui/MailDataModel.qml')
-rw-r--r--components/mailviewer/contents/ui/MailDataModel.qml16
1 files changed, 15 insertions, 1 deletions
diff --git a/components/mailviewer/contents/ui/MailDataModel.qml b/components/mailviewer/contents/ui/MailDataModel.qml
index 0f64972c..bc2fdc58 100644
--- a/components/mailviewer/contents/ui/MailDataModel.qml
+++ b/components/mailviewer/contents/ui/MailDataModel.qml
@@ -29,6 +29,20 @@ DelegateModel {
29 width: parent.width 29 width: parent.width
30 height: childrenRect.height 30 height: childrenRect.height
31 31
32 function getColor(securityLevel)
33 {
34 if (securityLevel == "good") {
35 return Kube.Colors.positiveColor
36 }
37 if (securityLevel == "bad") {
38 return Kube.Colors.negativeColor
39 }
40 if (securityLevel == "notsogood") {
41 return Kube.Colors.warningColor
42 }
43 return Kube.Colors.lightgrey
44 }
45
32 Row { 46 Row {
33 anchors { 47 anchors {
34 top: parent.top 48 top: parent.top
@@ -45,7 +59,7 @@ DelegateModel {
45 bottom: parent.bottom 59 bottom: parent.bottom
46 } 60 }
47 width: Kube.Units.smallSpacing 61 width: Kube.Units.smallSpacing
48 color: Kube.Colors.positiveColor 62 color: getColor(model.securityLevel)
49 opacity: 0.5 63 opacity: 0.5
50 } 64 }
51 65