Fix clicking in image viewer always closing GIFs

This commit is contained in:
miruka 2020-07-19 16:02:38 -04:00
parent 465d31790f
commit 2dbb155a22
3 changed files with 12 additions and 6 deletions

View File

@ -2,7 +2,6 @@
- Image viewer:
- open externally in context menu in timeline thumbnail
- fix: gif always closes?
- hflickable support kinetic scrolling disabler and speed/decel settings
- buttons
- keyboard controls

View File

@ -20,6 +20,12 @@ Image {
readonly property int circleRadius:
Math.ceil(Math.max(image.width, image.height))
readonly property int animatedPaintedWidth:
animatedLoader.item ? animatedLoader.item.paintedWidth : 0
readonly property int animatedPaintedHeight:
animatedLoader.item ? animatedLoader.item.paintedHeight : 0
function reload() {
// Can be reimplemented in components inheriting HImage
const oldSource = source
@ -99,6 +105,7 @@ Image {
}
HLoader {
id: animatedLoader
anchors.fill: parent
sourceComponent: animate && animated ? animatedImageComponent : null
}

View File

@ -28,14 +28,14 @@ HPopup {
overallSize.height == window.height
readonly property int paintedWidth:
full.status === Image.Ready?
full.paintedWidth :
thumbnail.paintedWidth
full.status === Image.Ready ?
full.animatedPaintedWidth || full.paintedWidth :
thumbnail.animatedPaintedWidth || thumbnail.paintedWidth
readonly property int paintedHeight:
full.status === Image.Ready ?
full.paintedHeight :
thumbnail.paintedHeight
full.animatedPaintedHeight || full.paintedHeight :
thumbnail.animatedPaintedHeight || thumbnail.paintedHeight
signal openExternallyRequested()