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