From d3ee50ea6f43254930169a2445a384621ac209b8 Mon Sep 17 00:00:00 2001 From: MrMirDan Date: Tue, 24 Mar 2026 16:05:44 +0200 Subject: [PATCH] update: remade EncryptionIndicator --- .../ui/qml/Components/EncryptionIndicator.qml | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/client/ui/qml/Components/EncryptionIndicator.qml b/client/ui/qml/Components/EncryptionIndicator.qml index 704688319..a8654643c 100644 --- a/client/ui/qml/Components/EncryptionIndicator.qml +++ b/client/ui/qml/Components/EncryptionIndicator.qml @@ -51,16 +51,35 @@ Rectangle { Layout.fillWidth: true Layout.leftMargin: 8 - text: root.linkEnabled ? root.textString - + qsTr(" Learn more").arg(AmneziaStyle.color.goldenApricot) - : root.textString + text: root.textString textFormat: Text.RichText color: root.textColor + } - onLinkActivated: function(link) { - if (link === "learnMore") { - Qt.openUrlExternally("https://storage.googleapis.com/amnezia/docs?m-path=/documentation/instructions/encryption") - } + BasicButtonType { + visible: root.linkEnabled + + hoverEnabled: false + + implicitHeight: root.iconHeight + implicitWidth: linkText.width/2 + 8 + + defaultColor: AmneziaStyle.color.transparent + + CaptionTextType { + id: linkText + + leftPadding: 4 + + width: linkText.text.length * linkText.font.pixelSize + + text: qsTr("Learn more") + textFormat: Text.RichText + color: AmneziaStyle.color.goldenApricot + } + + clickedFunc: function() { + Qt.openUrlExternally("https://storage.googleapis.com/amnezia/docs?m-path=/documentation/instructions/encryption") } } }