Change cursor shape when image hovered
This commit is contained in:
parent
be481b778a
commit
ea9caa69f6
|
@ -14,8 +14,10 @@ Row {
|
||||||
readonly property string hoveredLink:
|
readonly property string hoveredLink:
|
||||||
nameLabel.hoveredLink || contentLabel.hoveredLink
|
nameLabel.hoveredLink || contentLabel.hoveredLink
|
||||||
|
|
||||||
|
property string hoveredImage: ""
|
||||||
|
|
||||||
readonly property int cursorShape:
|
readonly property int cursorShape:
|
||||||
hoveredLink ? Qt.PointingHandCursor :
|
hoveredLink || hoveredImage ? Qt.PointingHandCursor :
|
||||||
nameHover.hovered || contentHover.hovered ? Qt.IBeamCursor :
|
nameHover.hovered || contentHover.hovered ? Qt.IBeamCursor :
|
||||||
Qt.ArrowCursor
|
Qt.ArrowCursor
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,6 @@ Column {
|
||||||
|
|
||||||
readonly property var previewLinks: model.preview_links
|
readonly property var previewLinks: model.preview_links
|
||||||
|
|
||||||
property string hoveredImage: ""
|
|
||||||
|
|
||||||
|
|
||||||
function json() {
|
function json() {
|
||||||
return JSON.stringify(
|
return JSON.stringify(
|
||||||
|
@ -89,7 +87,7 @@ Column {
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
onTapped: {
|
onTapped: {
|
||||||
contextMenu.link = eventContent.hoveredLink
|
contextMenu.link = eventContent.hoveredLink
|
||||||
contextMenu.image = eventDelegate.hoveredImage
|
contextMenu.image = eventContent.hoveredImage
|
||||||
contextMenu.popup()
|
contextMenu.popup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,8 @@ HImage {
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: hover
|
id: hover
|
||||||
onHoveredChanged: eventDelegate.hoveredImage = hovered ? image.source : ""
|
onHoveredChanged:
|
||||||
|
eventContent.hoveredImage = hovered ? image.source : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user