Fix weird spacing and hidden encryption indicator in top bar
This commit is contained in:
parent
dd11188dff
commit
f261bbb32d
@ -13,10 +13,12 @@ Image {
|
|||||||
|
|
||||||
property bool encrypted: false
|
property bool encrypted: false
|
||||||
property int trust: Crypto.Unverified
|
property int trust: Crypto.Unverified
|
||||||
|
property string unencryptedIcon: ":/icons/icons/ui/shield-filled-cross.svg"
|
||||||
|
property color unencryptedColor: Nheko.theme.error
|
||||||
|
|
||||||
property string sourceUrl: {
|
property string sourceUrl: {
|
||||||
if (!encrypted)
|
if (!encrypted)
|
||||||
return "image://colorimage/:/icons/icons/ui/shield-filled-cross.svg?";
|
return "image://colorimage/"+unencryptedIcon+"?";
|
||||||
|
|
||||||
switch (trust) {
|
switch (trust) {
|
||||||
case Crypto.Verified:
|
case Crypto.Verified:
|
||||||
@ -45,7 +47,7 @@ Image {
|
|||||||
return sourceUrl + Nheko.theme.error;
|
return sourceUrl + Nheko.theme.error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return sourceUrl + Nheko.theme.error;
|
return sourceUrl + unencryptedColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolTip.visible: ma.hovered
|
ToolTip.visible: ma.hovered
|
||||||
|
@ -144,10 +144,11 @@ Pane {
|
|||||||
contentItem: EncryptionIndicator {
|
contentItem: EncryptionIndicator {
|
||||||
sourceSize.height: parent.Layout.preferredHeight * Screen.devicePixelRatio
|
sourceSize.height: parent.Layout.preferredHeight * Screen.devicePixelRatio
|
||||||
sourceSize.width: parent.Layout.preferredWidth * Screen.devicePixelRatio
|
sourceSize.width: parent.Layout.preferredWidth * Screen.devicePixelRatio
|
||||||
visible: isEncrypted
|
|
||||||
encrypted: isEncrypted
|
encrypted: isEncrypted
|
||||||
trust: trustlevel
|
trust: trustlevel
|
||||||
enabled: false
|
enabled: false
|
||||||
|
unencryptedIcon: ":/icons/icons/ui/people.svg"
|
||||||
|
unencryptedColor: Nheko.colors.buttonText
|
||||||
}
|
}
|
||||||
|
|
||||||
background: null
|
background: null
|
||||||
@ -155,7 +156,7 @@ Pane {
|
|||||||
ToolTip.delay: Nheko.tooltipDelay
|
ToolTip.delay: Nheko.tooltipDelay
|
||||||
ToolTip.text: {
|
ToolTip.text: {
|
||||||
if (!isEncrypted)
|
if (!isEncrypted)
|
||||||
return qsTr("This room is not encrypted!");
|
return qsTr("Show room members.");
|
||||||
|
|
||||||
switch (trustlevel) {
|
switch (trustlevel) {
|
||||||
case Crypto.Verified:
|
case Crypto.Verified:
|
||||||
@ -330,7 +331,7 @@ Pane {
|
|||||||
|
|
||||||
Layout.row: 3
|
Layout.row: 3
|
||||||
Layout.column: 2
|
Layout.column: 2
|
||||||
Layout.columnSpan: 3
|
Layout.columnSpan: 1
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Math.min(contentHeight, Nheko.avatarSize * 1.5)
|
Layout.preferredHeight: Math.min(contentHeight, Nheko.avatarSize * 1.5)
|
||||||
|
Loading…
Reference in New Issue
Block a user