From 76a0caaa13576288d95d05f86ced406b19c69d61 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Mon, 30 May 2022 10:46:38 +0200 Subject: [PATCH] fix(StatusRoundedImage): actual loaded image width and height updated In case you're dynamically change source image and image width and height are way bigger than the rounded image component width and height, resizing was not done correctly. update update --- .../src/StatusQ/Components/StatusRoundedImage.qml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml b/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml index 810665eb27..b83e71926b 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusRoundedImage.qml @@ -28,11 +28,19 @@ Rectangle { id: image width: statusRoundImage.width height: statusRoundImage.height - sourceSize.width: parent.width * 2 - sourceSize.height: parent.height * 2 fillMode: Image.PreserveAspectFit anchors.centerIn: parent - cache: true + + onSourceChanged: { + if (sourceSize.width < width || sourceSize.height < height) { + sourceSize = Qt.binding(function() { + return Qt.size(width * 2, height * 2) + }) + } + else { + sourceSize = undefined + } + } } Loader {