diff --git a/TODO.md b/TODO.md index eb735338..2830e771 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/src/gui/Base/HImage.qml b/src/gui/Base/HImage.qml index 6bc0ddd1..e7680855 100644 --- a/src/gui/Base/HImage.qml +++ b/src/gui/Base/HImage.qml @@ -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 } diff --git a/src/gui/Popups/ImageViewerPopup.qml b/src/gui/Popups/ImageViewerPopup.qml index 22c267b8..52dec089 100644 --- a/src/gui/Popups/ImageViewerPopup.qml +++ b/src/gui/Popups/ImageViewerPopup.qml @@ -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()