EventDelegate context menu, EventFile click

Improve/extend choosing the cursor shape, how context menu handles the
current hovered thing, and open link on EventFile click
This commit is contained in:
miruka
2019-09-14 18:33:32 -04:00
parent a80f294610
commit c6395ff940
6 changed files with 70 additions and 58 deletions

View File

@@ -17,19 +17,14 @@ HImage {
TapHandler {
onTapped: if (! image.animated) Qt.openUrlExternally(image.fullSource)
onDoubleTapped: Qt.openUrlExternally(image.fullSource)
onTapped: if (! image.animated) Qt.openUrlExternally(fullSource)
onDoubleTapped: Qt.openUrlExternally(fullSource)
}
HoverHandler {
id: hover
onHoveredChanged:
eventContent.hoveredImage = hovered ? image.fullSource : ""
}
MouseArea {
anchors.fill: image
acceptedButtons: Qt.NoButton
cursorShape: Qt.PointingHandCursor
eventDelegate.hoveredMediaTypeUrl =
hovered ? [EventDelegate.Media.Image, fullSource] : []
}
}