fix gif crap again

This commit is contained in:
miruka 2020-07-17 07:26:31 -04:00
parent 03af1da1d4
commit eea2693c6a
5 changed files with 11 additions and 3 deletions

View File

@ -66,6 +66,7 @@ Rectangle {
sourceSize.width: parent.width
sourceSize.height: parent.height
fillMode: Image.PreserveAspectCrop
animatedFillMode: AnimatedImage.PreserveAspectCrop
animate: false
radius: parent.radius
@ -92,6 +93,7 @@ Rectangle {
contentItem: HMxcImage {
id: avatarToolTipImage
fillMode: Image.PreserveAspectCrop
animatedFillMode: AnimatedImage.PreserveAspectCrop
mxc: avatarImage.mxc
title: avatarImage.title

View File

@ -12,6 +12,8 @@ Image {
property bool animated:
utils.urlExtension(image.source).toLowerCase() === "gif"
property int animatedFillMode: AnimatedImage.PreserveAspectFit
property alias radius: roundMask.radius
property alias showProgressBar: progressBarLoader.active
@ -40,7 +42,7 @@ Image {
source: image.source
autoTransform: image.autoTransform
asynchronous: image.asynchronous
fillMode: image.fillMode
fillMode: image.animatedFillMode
mirror: image.mirror
mipmap: image.mipmap
@ -58,6 +60,11 @@ Image {
// Hack to make the non-animated image behind this one
// basically invisible
Binding {
target: image
property: "fillMode"
value: Image.Pad
}
Binding {
target: image
property: "sourceSize.width"

View File

@ -54,7 +54,6 @@ HColumnPopup {
property int updateCounter: 0
source: "image://clipboard/" + updateCounter
fillMode: Image.PreserveAspectFit
sourceSize.width: popup.contentWidthLimit
Layout.fillWidth: true

View File

@ -49,7 +49,6 @@ HColumnPopup {
HImage {
source: popup.filePath
fillMode: Image.PreserveAspectFit
visible: status !== Image.Error
sourceSize.width: popup.contentWidthLimit

View File

@ -116,6 +116,7 @@ Item {
id: image
visible: Boolean(Qt.resolvedUrl(source))
fillMode: Image.PreserveAspectCrop
animatedFillMode: AnimatedImage.PreserveAspectCrop
source: theme.ui.image
sourceSize.width: Screen.width
sourceSize.height: Screen.height