Change members button color when hovered

This commit is contained in:
Loren Burkholder 2023-02-25 22:58:18 -05:00
parent eced5c83b4
commit f3ab0abadf
2 changed files with 22 additions and 20 deletions

View file

@ -14,6 +14,8 @@ Image {
property int trust: Crypto.Unverified
property string unencryptedIcon: ":/icons/icons/ui/shield-filled-cross.svg"
property color unencryptedColor: Nheko.theme.error
property color unencryptedHoverColor: unencryptedColor
property bool hovered: ma.hovered
property string sourceUrl: {
if (!encrypted)
@ -46,10 +48,10 @@ Image {
return sourceUrl + Nheko.theme.error;
}
} else {
return sourceUrl + unencryptedColor;
return sourceUrl + (stateImg.hovered ? unencryptedHoverColor : unencryptedColor);
}
}
ToolTip.visible: ma.hovered
ToolTip.visible: stateImg.hovered
ToolTip.text: {
if (!encrypted)
return qsTr("This message is not encrypted!");

View file

@ -242,9 +242,8 @@ Pane {
enabled: false
unencryptedIcon: ":/icons/icons/ui/people.svg"
unencryptedColor: Nheko.colors.buttonText
}
background: null
unencryptedHoverColor: Nheko.colors.highlight
hovered: parent.hovered
ToolTip.delay: Nheko.tooltipDelay
ToolTip.text: {
@ -260,8 +259,9 @@ Pane {
return qsTr("This room contains unverified devices!");
}
}
ToolTip.visible: hovered
}
background: null
onClicked: TimelineManager.openRoomMembers(room)
}