From 815ec1b30eab215dc2688abe65389c4209e9f15b Mon Sep 17 00:00:00 2001 From: James Graham Date: Sat, 12 Nov 2022 14:42:20 +0000 Subject: [PATCH] Show animated images Use animated images in imageDelegate and FullScreenImage so that animated images can be viewed. Note webp animated images don't work this is a bug with qt see https://bugreports.qt.io/browse/QTBUG-70245 --- src/qml/Component/FullScreenImage.qml | 2 +- src/qml/Component/Timeline/ImageDelegate.qml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qml/Component/FullScreenImage.qml b/src/qml/Component/FullScreenImage.qml index 1f8b4743c..3b09ebeb2 100644 --- a/src/qml/Component/FullScreenImage.qml +++ b/src/qml/Component/FullScreenImage.qml @@ -204,7 +204,7 @@ Popup { Layout.bottomMargin: Kirigami.Units.largeSpacing clip: true - Image { + AnimatedImage { id: image property var scaleFactor: 1 diff --git a/src/qml/Component/Timeline/ImageDelegate.qml b/src/qml/Component/Timeline/ImageDelegate.qml index ecd186f30..92c833766 100644 --- a/src/qml/Component/Timeline/ImageDelegate.qml +++ b/src/qml/Component/Timeline/ImageDelegate.qml @@ -28,7 +28,7 @@ TimelineContainer { readonly property var maxWidth: Kirigami.Units.gridUnit * 30 - innerObject: Image { + innerObject: AnimatedImage { id: img Layout.maximumWidth: Math.min(imageDelegate.contentMaxWidth, imageDelegate.maxWidth) @@ -87,6 +87,7 @@ TimelineContainer { acceptedButtons: Qt.LeftButton onTapped: { img.ToolTip.hide() + img.paused = true fullScreenImage.open() } } @@ -99,6 +100,8 @@ TimelineContainer { imageWidth: content.info.w imageHeight: content.info.h modelData: model + + onClosed: img.paused = false } function downloadAndOpen() {