Fix flickering image during resize on chat information page

This commit is contained in:
Sebastian Wolf 2020-11-10 21:11:25 +01:00
parent 5d3805759a
commit 3607ca98a0
3 changed files with 5 additions and 2 deletions

View file

@ -29,6 +29,7 @@ Item {
property string replacementStringHint: "X"
property int radius: width / 2
property int imageStatus: -1
property bool optimizeImageSize: true
function getReplacementString() {
if (replacementStringHint.length > 2) {
@ -67,8 +68,8 @@ Item {
height: width
anchors.centerIn: parent
source: file.path
sourceSize.width: width
sourceSize.height: height
sourceSize.width: optimizeImageSize ? width : undefined
sourceSize.height: optimizeImageSize ? height : undefined
fillMode: Image.PreserveAspectCrop
autoTransform: true
asynchronous: true

View file

@ -32,6 +32,7 @@ Item {
photoData: (typeof chatInformation.photo !== "undefined") ? chatInformation.photo.big : ""
replacementStringHint: ""
radius: chatPictureThumbnail.radius
optimizeImageSize: false
}
MouseArea {

View file

@ -260,6 +260,7 @@ Page {
height: width
radius: imageContainer.minDimension / 2
opacity: profilePictureLoader.status !== Loader.Ready || profilePictureLoader.item.opacity < 1 ? 1.0 : 0.0
optimizeImageSize: false
}
Loader {
id: profilePictureLoader