From 2154b6b541d49ba0a85c286da0486888d1b918c4 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 27 Aug 2017 15:41:24 -0600 Subject: Expose some signature details in a tooltip. We'll want a proper UI for that at some point, but this is a start. --- .../mailviewer/contents/ui/MailDataModel.qml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (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 a626a35a..32188a04 100644 --- a/components/mailviewer/contents/ui/MailDataModel.qml +++ b/components/mailviewer/contents/ui/MailDataModel.qml @@ -43,6 +43,19 @@ DelegateModel { return Kube.Colors.lightgrey } + function getDetails(signatureDetails) + { + var details = qsTr("Signature") + ":\n" + details += qsTr("Key Id") + ": " + model.signatureDetails.keyId + "\n" + if (model.signatureDetails.keyMissing) { + details += qsTr("Key details are not available.") + "\n" + } + if (model.signatureDetails.keyIsTrusted) { + details += qsTr("You are trusting this key.") + "\n" + } + return details + } + Row { anchors { top: parent.top @@ -61,6 +74,21 @@ DelegateModel { width: Kube.Units.smallSpacing color: getColor(model.securityLevel) opacity: 0.5 + Kube.ToolTip { + id: tooltip + text: getDetails(model.signatureDetails) + visible: mouseArea.containsMouse + } + Kube.SelectableItem { + visualParent: border + text: tooltip.text + } + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.NoButton + } } Loader { -- cgit v1.2.3