Play m.image events GIFs, rename some properties
This commit is contained in:
@@ -6,21 +6,24 @@ HImage {
|
||||
id: image
|
||||
horizontalAlignment: Image.AlignLeft
|
||||
sourceSize.width: theme.chat.message.thumbnailWidth // FIXME
|
||||
source: animated ? openUrl : thumbnailUrl
|
||||
|
||||
|
||||
// source = thumbnail, fullSource = full original image
|
||||
property url fullSource: source
|
||||
property url thumbnailUrl
|
||||
property url fullImageUrl
|
||||
|
||||
readonly property url openUrl: fullImageUrl || thumbnailUrl
|
||||
|
||||
|
||||
TapHandler {
|
||||
onTapped: if (! image.animated) Qt.openUrlExternally(fullSource)
|
||||
onDoubleTapped: Qt.openUrlExternally(fullSource)
|
||||
onTapped: if (! image.animated) Qt.openUrlExternally(openUrl)
|
||||
onDoubleTapped: Qt.openUrlExternally(openUrl)
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: hover
|
||||
onHoveredChanged:
|
||||
eventDelegate.hoveredMediaTypeUrl =
|
||||
hovered ? [EventDelegate.Media.Image, fullSource] : []
|
||||
hovered ? [EventDelegate.Media.Image, openUrl] : []
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user