Merge pull request #9586 from Ultimaker/CURA-8145_fix_animated_images

Support animated images in what's new pages
This commit is contained in:
Remco Burema 2021-04-16 16:33:23 +02:00 committed by GitHub
commit ecd70a98b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ Item
width: whatsNewViewport.width width: whatsNewViewport.width
height: whatsNewViewport.height height: whatsNewViewport.height
Image AnimatedImage
{ {
id: subpageImage id: subpageImage
@ -84,9 +84,9 @@ Item
right: parent.right right: parent.right
rightMargin: UM.Theme.getSize("thick_margin").width rightMargin: UM.Theme.getSize("thick_margin").width
} }
width: sourceSize.width width: Math.round(parent.width - (UM.Theme.getSize("thick_margin").height * 2))
sourceSize.width: Math.round(parent.width - (UM.Theme.getSize("thick_margin").height * 2))
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
onStatusChanged: playing = (status == AnimatedImage.Ready)
source: manager.getSubpageImageSource(index) source: manager.getSubpageImageSource(index)
} }