diff --git a/applets/mediaframe/package/contents/ui/main.qml b/applets/mediaframe/package/contents/ui/main.qml --- a/applets/mediaframe/package/contents/ui/main.qml +++ b/applets/mediaframe/package/contents/ui/main.qml @@ -180,6 +180,19 @@ visible: hasItems anchors.fill: parent + // Don't reload the image in the middle of a resize operation to + // minimize re-reading the file on disk + Timer { + id: imageReloadTimer + interval: 250 + running: false + onTriggered: { + console.log('Timer fired; reloading image on disk') + frontImage.sourceSize.width = width + frontImage.sourceSize.height = height + } + } + Image { id: bufferImage @@ -208,6 +221,9 @@ asynchronous: true autoTransform: true + onWidthChanged: imageReloadTimer.restart() + onHeightChanged: imageReloadTimer.restart() + MouseArea { anchors.fill: parent onClicked: Qt.openUrlExternally(activeSource)