EventImage: open/copy original image on clicks
This commit is contained in:
parent
45b6714bcb
commit
69aea0e37f
2
TODO.md
2
TODO.md
|
@ -1,10 +1,12 @@
|
|||
- Media
|
||||
- Caching
|
||||
- Downloading
|
||||
- Uploading (+local echo)
|
||||
- GIF thumbnails: load the real animated image
|
||||
- Files, links, video, audio
|
||||
- Encrypted media
|
||||
- Loading animation
|
||||
- Copy thumbnail URL in context menu?
|
||||
|
||||
- RoomMessageNotice
|
||||
|
||||
|
|
|
@ -12,15 +12,20 @@ HImage {
|
|||
theme.chat.message.thumbnailWidth,
|
||||
)
|
||||
|
||||
|
||||
// source = thumbnail, fullSource = full original image
|
||||
property url fullSource: source
|
||||
|
||||
|
||||
TapHandler {
|
||||
onTapped: if (! image.animated) Qt.openUrlExternally(image.source)
|
||||
onDoubleTapped: Qt.openUrlExternally(image.source)
|
||||
onTapped: if (! image.animated) Qt.openUrlExternally(image.fullSource)
|
||||
onDoubleTapped: Qt.openUrlExternally(image.fullSource)
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: hover
|
||||
onHoveredChanged:
|
||||
eventContent.hoveredImage = hovered ? image.source : ""
|
||||
eventContent.hoveredImage = hovered ? image.fullSource : ""
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -55,7 +55,7 @@ HLoader {
|
|||
onPreviewUrlChanged: {
|
||||
if (type === EventMediaLoader.Type.Image) {
|
||||
var file = "EventImage.qml"
|
||||
var props = { source: previewUrl }
|
||||
var props = { source: previewUrl, fullSource: mediaUrl }
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user