mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Change members button color when hovered
This commit is contained in:
parent
eced5c83b4
commit
f3ab0abadf
2 changed files with 22 additions and 20 deletions
|
@ -14,10 +14,12 @@ Image {
|
||||||
property int trust: Crypto.Unverified
|
property int trust: Crypto.Unverified
|
||||||
property string unencryptedIcon: ":/icons/icons/ui/shield-filled-cross.svg"
|
property string unencryptedIcon: ":/icons/icons/ui/shield-filled-cross.svg"
|
||||||
property color unencryptedColor: Nheko.theme.error
|
property color unencryptedColor: Nheko.theme.error
|
||||||
|
property color unencryptedHoverColor: unencryptedColor
|
||||||
|
property bool hovered: ma.hovered
|
||||||
|
|
||||||
property string sourceUrl: {
|
property string sourceUrl: {
|
||||||
if (!encrypted)
|
if (!encrypted)
|
||||||
return "image://colorimage/"+unencryptedIcon+"?";
|
return "image://colorimage/" + unencryptedIcon + "?";
|
||||||
|
|
||||||
switch (trust) {
|
switch (trust) {
|
||||||
case Crypto.Verified:
|
case Crypto.Verified:
|
||||||
|
@ -46,10 +48,10 @@ Image {
|
||||||
return sourceUrl + Nheko.theme.error;
|
return sourceUrl + Nheko.theme.error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return sourceUrl + unencryptedColor;
|
return sourceUrl + (stateImg.hovered ? unencryptedHoverColor : unencryptedColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolTip.visible: ma.hovered
|
ToolTip.visible: stateImg.hovered
|
||||||
ToolTip.text: {
|
ToolTip.text: {
|
||||||
if (!encrypted)
|
if (!encrypted)
|
||||||
return qsTr("This message is not encrypted!");
|
return qsTr("This message is not encrypted!");
|
||||||
|
|
|
@ -242,9 +242,8 @@ Pane {
|
||||||
enabled: false
|
enabled: false
|
||||||
unencryptedIcon: ":/icons/icons/ui/people.svg"
|
unencryptedIcon: ":/icons/icons/ui/people.svg"
|
||||||
unencryptedColor: Nheko.colors.buttonText
|
unencryptedColor: Nheko.colors.buttonText
|
||||||
}
|
unencryptedHoverColor: Nheko.colors.highlight
|
||||||
|
hovered: parent.hovered
|
||||||
background: null
|
|
||||||
|
|
||||||
ToolTip.delay: Nheko.tooltipDelay
|
ToolTip.delay: Nheko.tooltipDelay
|
||||||
ToolTip.text: {
|
ToolTip.text: {
|
||||||
|
@ -260,8 +259,9 @@ Pane {
|
||||||
return qsTr("This room contains unverified devices!");
|
return qsTr("This room contains unverified devices!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolTip.visible: hovered
|
}
|
||||||
|
|
||||||
|
background: null
|
||||||
onClicked: TimelineManager.openRoomMembers(room)
|
onClicked: TimelineManager.openRoomMembers(room)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue