Fix flickering image during resize on chat information page
This commit is contained in:
parent
5d3805759a
commit
3607ca98a0
3 changed files with 5 additions and 2 deletions
|
@ -29,6 +29,7 @@ Item {
|
||||||
property string replacementStringHint: "X"
|
property string replacementStringHint: "X"
|
||||||
property int radius: width / 2
|
property int radius: width / 2
|
||||||
property int imageStatus: -1
|
property int imageStatus: -1
|
||||||
|
property bool optimizeImageSize: true
|
||||||
|
|
||||||
function getReplacementString() {
|
function getReplacementString() {
|
||||||
if (replacementStringHint.length > 2) {
|
if (replacementStringHint.length > 2) {
|
||||||
|
@ -67,8 +68,8 @@ Item {
|
||||||
height: width
|
height: width
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: file.path
|
source: file.path
|
||||||
sourceSize.width: width
|
sourceSize.width: optimizeImageSize ? width : undefined
|
||||||
sourceSize.height: height
|
sourceSize.height: optimizeImageSize ? height : undefined
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
autoTransform: true
|
autoTransform: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
|
@ -32,6 +32,7 @@ Item {
|
||||||
photoData: (typeof chatInformation.photo !== "undefined") ? chatInformation.photo.big : ""
|
photoData: (typeof chatInformation.photo !== "undefined") ? chatInformation.photo.big : ""
|
||||||
replacementStringHint: ""
|
replacementStringHint: ""
|
||||||
radius: chatPictureThumbnail.radius
|
radius: chatPictureThumbnail.radius
|
||||||
|
optimizeImageSize: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
@ -260,6 +260,7 @@ Page {
|
||||||
height: width
|
height: width
|
||||||
radius: imageContainer.minDimension / 2
|
radius: imageContainer.minDimension / 2
|
||||||
opacity: profilePictureLoader.status !== Loader.Ready || profilePictureLoader.item.opacity < 1 ? 1.0 : 0.0
|
opacity: profilePictureLoader.status !== Loader.Ready || profilePictureLoader.item.opacity < 1 ? 1.0 : 0.0
|
||||||
|
optimizeImageSize: false
|
||||||
}
|
}
|
||||||
Loader {
|
Loader {
|
||||||
id: profilePictureLoader
|
id: profilePictureLoader
|
||||||
|
|
Loading…
Reference in a new issue