Change cursor shape when image hovered
This commit is contained in:
parent
be481b778a
commit
ea9caa69f6
|
@ -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
|
||||
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@ HImage {
|
|||
|
||||
HoverHandler {
|
||||
id: hover
|
||||
onHoveredChanged: eventDelegate.hoveredImage = hovered ? image.source : ""
|
||||
onHoveredChanged:
|
||||
eventContent.hoveredImage = hovered ? image.source : ""
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
Loading…
Reference in New Issue
Block a user