3 files changed, 30 insertions, 14 deletions
diff --git a/resources/qml/EncryptionIndicator.qml b/resources/qml/EncryptionIndicator.qml
index 7124cc53..0bd0dfa1 100644
--- a/resources/qml/EncryptionIndicator.qml
+++ b/resources/qml/EncryptionIndicator.qml
@@ -13,14 +13,25 @@ Image {
property int trust: Crypto.Unverified
property string sourceUrl: {
- if (width <= 16 || height <= 16)
- return "image://colorimage/:/icons/icons/ui/shield-small-filled.svg?";
- else
- return "image://colorimage/:/icons/icons/ui/shield.svg?";
+ if (!encrypted)
+ return "image://colorimage/:/icons/icons/ui/shield-filled-cross.svg?";
+
+ switch (trust) {
+ case Crypto.Verified:
+ return "image://colorimage/:/icons/icons/ui/shield-filled-checkmark.svg?";
+ case Crypto.TOFU:
+ return "image://colorimage/:/icons/icons/ui/shield-filled.svg?";
+ case Crypto.Unverified:
+ return "image://colorimage/:/icons/icons/ui/shield-filled-exclamation-mark.svg?";
+ default:
+ return "image://colorimage/:/icons/icons/ui/shield-filled-cross.svg?";
+ }
}
width: 16
height: 16
+ sourceSize.height: height
+ sourceSize.width: width
source: {
if (encrypted) {
switch (trust) {
diff --git a/resources/qml/TopBar.qml b/resources/qml/TopBar.qml
index 433cd321..45ce289a 100644
--- a/resources/qml/TopBar.qml
+++ b/resources/qml/TopBar.qml
@@ -117,6 +117,8 @@ Rectangle {
Layout.rowSpan: 2
Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium
Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium
+ sourceSize.height: Layout.preferredHeight
+ sourceSize.width: Layout.preferredWidth
visible: isEncrypted
encrypted: isEncrypted
trust: trustlevel
diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index e4a0a6cb..6c8f9ba2 100644
--- a/resources/qml/dialogs/UserProfile.qml
+++ b/resources/qml/dialogs/UserProfile.qml
@@ -213,12 +213,13 @@ ApplicationWindow {
onClicked: profile.verify()
}
- Image {
+ EncryptionIndicator {
Layout.preferredHeight: 16
Layout.preferredWidth: 16
- source: "image://colorimage/:/icons/icons/ui/shield-small-filled.svg?" + ((profile.userVerified == Crypto.Verified) ? "green" : Nheko.colors.buttonText)
- visible: profile.userVerified != Crypto.Unverified
+ encrypted: profile.userVerificationEnabled
+ trust: profile.userVerified
Layout.alignment: Qt.AlignHCenter
+ ToolTip.visible: false
}
RowLayout {
@@ -304,16 +305,18 @@ ApplicationWindow {
Layout.preferredHeight: 16
Layout.preferredWidth: 16
visible: profile.isSelf && verificationStatus != VerificationStatus.NOT_APPLICABLE
+ sourceSize.height: 16
+ sourceSize.width: 16
source: {
switch (verificationStatus) {
case VerificationStatus.VERIFIED:
- return "image://colorimage/:/icons/icons/ui/shield-small-filled.svg?green";
+ return "image://colorimage/:/icons/icons/ui/shield-filled-checkmark.svg?green";
case VerificationStatus.UNVERIFIED:
- return "image://colorimage/:/icons/icons/ui/shield-unprotected.svg?#d6c020";
+ return "image://colorimage/:/icons/icons/ui/shield-filled-exclamation-mark.svg?#d6c020";
case VerificationStatus.SELF:
- return "image://colorimage/:/icons/icons/ui/checkmark.svg?green";
+ return "image://colorimage/:/icons/ui/checkmark.svg?green";
default:
- return "image://colorimage/:/icons/icons/ui/shield-unprotected.svg?red";
+ return "image://colorimage/:/icons/ui/shield-filled-cross.svg?#d6c020";
}
}
}
@@ -388,13 +391,13 @@ ApplicationWindow {
source: {
switch (verificationStatus) {
case VerificationStatus.VERIFIED:
- return "image://colorimage/:/icons/icons/ui/shield-small-filled.svg?green";
+ return "image://colorimage/:/icons/icons/ui/shield-filled-checkmark.svg?green";
case VerificationStatus.UNVERIFIED:
- return "image://colorimage/:/icons/icons/ui/shield-unprotected.svg?#d6c020";
+ return "image://colorimage/:/icons/icons/ui/shield-filled-exclamation-mark.svg?#d6c020";
case VerificationStatus.SELF:
return "image://colorimage/:/icons/icons/ui/checkmark.svg?green";
default:
- return "image://colorimage/:/icons/icons/ui/shield-unprotected.svg?red";
+ return "image://colorimage/:/icons/icons/ui/shield-filled.svg?red";
}
}
}
|