Use filled shields everywhere and distinguish different states more

This commit is contained in:
Nicolas Werner 2021-11-17 00:35:35 +01:00
parent f3aeb4b044
commit df1f549a2c
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
11 changed files with 38 additions and 26 deletions

View file

@ -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) {