Image viewer: handle images without known w/h
There's no way to know in advance the real size for HTTP image previews and m.image events sent by some clients
This commit is contained in:
parent
6b1a5a46e6
commit
465d31790f
1
TODO.md
1
TODO.md
|
@ -1,7 +1,6 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- Image viewer:
|
- Image viewer:
|
||||||
- support http urls
|
|
||||||
- open externally in context menu in timeline thumbnail
|
- open externally in context menu in timeline thumbnail
|
||||||
- fix: gif always closes?
|
- fix: gif always closes?
|
||||||
- hflickable support kinetic scrolling disabler and speed/decel settings
|
- hflickable support kinetic scrolling disabler and speed/decel settings
|
||||||
|
|
|
@ -84,10 +84,14 @@ HMxcImage {
|
||||||
|
|
||||||
overallSize: Qt.size(
|
overallSize: Qt.size(
|
||||||
loader.singleMediaInfo.media_width ||
|
loader.singleMediaInfo.media_width ||
|
||||||
loader.singleMediaInfo.thumbnail_width,
|
loader.singleMediaInfo.thumbnail_width ||
|
||||||
|
implicitWidth ||
|
||||||
|
800,
|
||||||
|
|
||||||
loader.singleMediaInfo.media_height ||
|
loader.singleMediaInfo.media_height ||
|
||||||
loader.singleMediaInfo.thumbnail_height,
|
loader.singleMediaInfo.thumbnail_height ||
|
||||||
|
implicitHeight ||
|
||||||
|
600,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
obj => { obj.openExternallyRequested.connect(openUrlExternally) },
|
obj => { obj.openExternallyRequested.connect(openUrlExternally) },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user