@@ -16,8 +16,8 @@ onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artSh
1616readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1717Item {
1818 id: artShapeHolder;
19− height: root.fixedArtShapeSize.height != -1 ? root.fixedArtShapeSize.height : artShapeLoader.height;
20− width: root.fixedArtShapeSize.width != -1 ? root.fixedArtShapeSize.width : artShapeLoader.width;
19+ height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
20+ width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
2121 anchors { horizontalCenter: parent.horizontalCenter; }
2222 Loader {
2323 id: artShapeLoader;
@@ -30,14 +30,14 @@ Item {
3030 objectName: "artShape";
3131 radius: "medium";
3232 visible: image.status == Image.Ready;
33− readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height != -1 && root.fixedArtShapeSize.width != -1) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
34− readonly property real aspect: fixedArtShapeSizeAspect != -1 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
33+ readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
34+ readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
3535 readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
3636 Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
3737 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
3838 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
3939 function updateWidthHeightBindings() {
40− if (root.fixedArtShapeSize.height != -1 && root.fixedArtShapeSize.width != -1) {
40+ if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
4141 width = root.fixedArtShapeSize.width;
4242 height = root.fixedArtShapeSize.height;
4343 } else if (aspectSmallerThanImageAspect) {
@@ -73,7 +73,7 @@ Loader {
7373 visible: showHeader && status == Loader.Ready;
7474 sourceComponent: ShaderEffect {
7575 id: overlay;
76− height: fixedHeaderHeight != -1 ? fixedHeaderHeight : headerHeight;
76+ height: fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight;
7777 opacity: 0.6;
7878 property var source: ShaderEffectSource {
7979 id: shaderSource;