From dd6348e1a98407b91f6758a38f42d849274866a3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 26 Aug 2017 14:32:09 -0600 Subject: Assign a color depending on the encryption/signature state. --- components/mailviewer/contents/ui/MailDataModel.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'components/mailviewer/contents/ui/MailDataModel.qml') 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 { width: parent.width height: childrenRect.height + function getColor(securityLevel) + { + if (securityLevel == "good") { + return Kube.Colors.positiveColor + } + if (securityLevel == "bad") { + return Kube.Colors.negativeColor + } + if (securityLevel == "notsogood") { + return Kube.Colors.warningColor + } + return Kube.Colors.lightgrey + } + Row { anchors { top: parent.top @@ -45,7 +59,7 @@ DelegateModel { bottom: parent.bottom } width: Kube.Units.smallSpacing - color: Kube.Colors.positiveColor + color: getColor(model.securityLevel) opacity: 0.5 } -- cgit v1.2.3