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.qml28
1 files changed, 28 insertions, 0 deletions
diff --git a/components/mailviewer/contents/ui/MailDataModel.qml b/components/mailviewer/contents/ui/MailDataModel.qml
index a626a35a..32188a04 100644
--- a/components/mailviewer/contents/ui/MailDataModel.qml
+++ b/components/mailviewer/contents/ui/MailDataModel.qml
@@ -43,6 +43,19 @@ DelegateModel {
43 return Kube.Colors.lightgrey 43 return Kube.Colors.lightgrey
44 } 44 }
45 45
46 function getDetails(signatureDetails)
47 {
48 var details = qsTr("Signature") + ":\n"
49 details += qsTr("Key Id") + ": " + model.signatureDetails.keyId + "\n"
50 if (model.signatureDetails.keyMissing) {
51 details += qsTr("Key details are not available.") + "\n"
52 }
53 if (model.signatureDetails.keyIsTrusted) {
54 details += qsTr("You are trusting this key.") + "\n"
55 }
56 return details
57 }
58
46 Row { 59 Row {
47 anchors { 60 anchors {
48 top: parent.top 61 top: parent.top
@@ -61,6 +74,21 @@ DelegateModel {
61 width: Kube.Units.smallSpacing 74 width: Kube.Units.smallSpacing
62 color: getColor(model.securityLevel) 75 color: getColor(model.securityLevel)
63 opacity: 0.5 76 opacity: 0.5
77 Kube.ToolTip {
78 id: tooltip
79 text: getDetails(model.signatureDetails)
80 visible: mouseArea.containsMouse
81 }
82 Kube.SelectableItem {
83 visualParent: border
84 text: tooltip.text
85 }
86 MouseArea {
87 id: mouseArea
88 anchors.fill: parent
89 hoverEnabled: true
90 acceptedButtons: Qt.NoButton
91 }
64 } 92 }
65 93
66 Loader { 94 Loader {