Change cursor shape when image hovered

This commit is contained in:
miruka 2019-09-06 17:21:41 -04:00
parent be481b778a
commit ea9caa69f6
3 changed files with 6 additions and 5 deletions

View File

@ -14,8 +14,10 @@ Row {
readonly property string hoveredLink:
nameLabel.hoveredLink || contentLabel.hoveredLink
property string hoveredImage: ""
readonly property int cursorShape:
hoveredLink ? Qt.PointingHandCursor :
hoveredLink || hoveredImage ? Qt.PointingHandCursor :
nameHover.hovered || contentHover.hovered ? Qt.IBeamCursor :
Qt.ArrowCursor

View File

@ -50,8 +50,6 @@ Column {
readonly property var previewLinks: model.preview_links
property string hoveredImage: ""
function json() {
return JSON.stringify(
@ -89,7 +87,7 @@ Column {
acceptedButtons: Qt.RightButton
onTapped: {
contextMenu.link = eventContent.hoveredLink
contextMenu.image = eventDelegate.hoveredImage
contextMenu.image = eventContent.hoveredImage
contextMenu.popup()
}
}

View File

@ -20,7 +20,8 @@ HImage {
HoverHandler {
id: hover
onHoveredChanged: eventDelegate.hoveredImage = hovered ? image.source : ""
onHoveredChanged:
eventContent.hoveredImage = hovered ? image.source : ""
}
MouseArea {