mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Improve hover stuff, needs HoverHandler for a proper fix
This commit is contained in:
parent
6a0de004a2
commit
bcfa683468
2 changed files with 11 additions and 8 deletions
|
@ -11,15 +11,23 @@ Item {
|
|||
anchors.right: parent.right
|
||||
height: row.height
|
||||
|
||||
Rectangle {
|
||||
color: (Settings.messageHoverHighlight && hoverHandler.containsMouse) ? colors.alternateBase : "transparent"
|
||||
anchors.fill: row
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: hoverHandler
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
preventStealing: true
|
||||
preventStealing: false
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.AllButtons
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.RightButton)
|
||||
messageContextMenu.show(model.id, model.type, model.isEncrypted, row);
|
||||
messageContextMenu.show(model.id, model.type, model.isEncrypted, row);
|
||||
else
|
||||
event.accepted = false
|
||||
|
||||
}
|
||||
onPressAndHold: {
|
||||
|
@ -27,11 +35,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: (Settings.messageHoverHighlight && parent.containsMouse) ? colors.base : "transparent"
|
||||
anchors.fill: row
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ Item {
|
|||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
preventStealing: true
|
||||
preventStealing: false
|
||||
onClicked: chat.positionViewAtIndex(chat.model.idToIndex(modelData.id), ListView.Contain)
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue