33
33
visible: image.status == Image.Ready;
34
34
readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
35
35
readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
37
36
Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
39
37
Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
40
38
function updateWidthHeightBindings() {
41
39
if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
42
40
width = root.fixedArtShapeSize.width;
43
41
height = root.fixedArtShapeSize.height;
45
43
width = Qt.binding(function() { return !visible ? 0 : image.width });
49
44
height = Qt.binding(function() { return !visible ? 0 : image.height });