@@ -28,34 +28,47 @@ Item {
2828 active: cardData && cardData["art"] || false;
2929 asynchronous: root.asynchronous;
3030 visible: status == Loader.Ready;
31− sourceComponent: UbuntuShape {
32− id: artShape;
33− objectName: "artShape";
34− radius: "medium";
35− visible: image.status == Image.Ready;
36− readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
37− readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
38− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
39− Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
40− function updateWidthHeightBindings() {
41− if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
42− width = root.fixedArtShapeSize.width;
43− height = root.fixedArtShapeSize.height;
44− } else {
31+ sourceComponent: Item {
32+ id: artShape;
33+ objectName: "artShape";
34+ property bool doShapeItem: components["art"]["conciergeMode"] !== true;
35+ visible: image.status == Image.Ready;
36+ readonly property alias image: artImage.image;
37+ ShaderEffectSource {
38+ id: artShapeSource;
39+ sourceItem: artImage;
40+ anchors.centerIn: parent;
41+ width: 1;
42+ height: 1;
43+ hideSource: doShapeItem;
44+ }
45+ Shape {
46+ image: artShapeSource;
47+ anchors.fill: parent;
48+ visible: doShapeItem;
49+ radius: "medium";
50+ }
51+ readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
52+ readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
53+ Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
54+ Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
55+ function updateWidthHeightBindings() {
56+ if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
57+ width = root.fixedArtShapeSize.width;
58+ height = root.fixedArtShapeSize.height;
59+ } else {
4560 width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
4661 height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
4762 }
48− }
63+ }
4964 CroppedImageMinimumSourceSize {
5065 id: artImage;
5166 objectName: "artImage";
52− source: cardData && cardData["art"] || "";
67+ source: cardData && cardData["art"] || "";
5368 asynchronous: root.asynchronous;
54− visible: false;
5569 width: root.width;
5670 height: width / artShape.aspect;
5771 }
58− image: artImage.image;
5972 }
6073 }
6174 }