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
This commit is contained in:
@@ -204,7 +204,7 @@ Popup {
|
|||||||
Layout.bottomMargin: Kirigami.Units.largeSpacing
|
Layout.bottomMargin: Kirigami.Units.largeSpacing
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Image {
|
AnimatedImage {
|
||||||
id: image
|
id: image
|
||||||
|
|
||||||
property var scaleFactor: 1
|
property var scaleFactor: 1
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ TimelineContainer {
|
|||||||
|
|
||||||
readonly property var maxWidth: Kirigami.Units.gridUnit * 30
|
readonly property var maxWidth: Kirigami.Units.gridUnit * 30
|
||||||
|
|
||||||
innerObject: Image {
|
innerObject: AnimatedImage {
|
||||||
id: img
|
id: img
|
||||||
|
|
||||||
Layout.maximumWidth: Math.min(imageDelegate.contentMaxWidth, imageDelegate.maxWidth)
|
Layout.maximumWidth: Math.min(imageDelegate.contentMaxWidth, imageDelegate.maxWidth)
|
||||||
@@ -87,6 +87,7 @@ TimelineContainer {
|
|||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onTapped: {
|
onTapped: {
|
||||||
img.ToolTip.hide()
|
img.ToolTip.hide()
|
||||||
|
img.paused = true
|
||||||
fullScreenImage.open()
|
fullScreenImage.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,6 +100,8 @@ TimelineContainer {
|
|||||||
imageWidth: content.info.w
|
imageWidth: content.info.w
|
||||||
imageHeight: content.info.h
|
imageHeight: content.info.h
|
||||||
modelData: model
|
modelData: model
|
||||||
|
|
||||||
|
onClosed: img.paused = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadAndOpen() {
|
function downloadAndOpen() {
|
||||||
|
|||||||
Reference in New Issue
Block a user