@@ -61,8 +61,10 @@ var kBackgroundLoaderCode = 'Loader {\n\
6161// %1 is used as anchors of artShapeHolder
6262// %2 is used as image width
6363// %3 is used as image height
64−// %4 is injected as code to artImage
65−// %5 is used as image fallback
64+// %4 is used for artShapeSource.hideSource and inner Loader visible
65+// %5 is used as aspect ratio fallback
66+// %6 is injected as code to artImage
67+// %7 is used as image fallback
6668var kArtShapeHolderCode = 'Item { \n\
6769 id: artShapeHolder; \n\
6870 height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
@@ -71,14 +73,13 @@ var kArtShapeHolderCode = 'Item { \n\
7173 Loader { \n\
7274 id: artShapeLoader; \n\
7375 objectName: "artShapeLoader"; \n\
74− readonly property string cardArt: cardData && cardData["art"] || %5; \n\
76+ readonly property string cardArt: cardData && cardData["art"] || %7; \n\
7577 active: cardArt != ""; \n\
7678 asynchronous: root.asynchronous; \n\
7779 visible: status == Loader.Ready; \n\
7880 sourceComponent: Item { \n\
7981 id: artShape; \n\
8082 objectName: "artShape"; \n\
81− readonly property bool doShapeItem: components["art"]["conciergeMode"] !== true; \n\
8283 visible: image.status == Image.Ready; \n\
8384 readonly property alias image: artImage; \n\
8485 ShaderEffectSource { \n\
@@ -87,11 +88,11 @@ var kArtShapeHolderCode = 'Item { \n\
8788 anchors.centerIn: parent; \n\
8889 width: 1; \n\
8990 height: 1; \n\
90− hideSource: doShapeItem; \n\
91+ hideSource: %4; \n\
9192 } \n\
9293 Loader { \n\
9394 anchors.fill: parent; \n\
94− visible: artShape.doShapeItem; \n\
95+ visible: %4; \n\
9596 sourceComponent: root.artShapeStyle === "icon" ? artShapeIconComponent : artShapeShapeComponent; \n\
9697 Component { \n\
9798 id: artShapeShapeComponent; \n\
@@ -115,7 +116,7 @@ var kArtShapeHolderCode = 'Item { \n\
115116 } \n\
116117 } \n\
117118 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
118− readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
119+ readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : %5; \n\
119120 Component.onCompleted: { updateWidthHeightBindings(); } \n\
120121 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
121122 function updateWidthHeightBindings() { \n\
@@ -134,7 +135,7 @@ var kArtShapeHolderCode = 'Item { \n\
134135 asynchronous: root.asynchronous; \n\
135136 width: %2; \n\
136137 height: %3; \n\
137− %4 \n\
138+ %6 \n\
138139 } \n\
139140 } \n\
140141 } \n\
@@ -395,7 +396,6 @@ function cardString(template, components) {
395396
396397 code = 'AbstractButton { \n\
397398 id: root; \n\
398− property var components; \n\
399399 property var cardData; \n\
400400 property string artShapeStyle: "inset"; \n\
401401 property string backgroundShapeStyle: "inset"; \n\
@@ -413,7 +413,8 @@ function cardString(template, components) {
413413
414414 var hasArt = components["art"] && components["art"]["field"] || false;
415415 var hasSummary = components["summary"] || false;
416− var artAndSummary = hasArt && hasSummary && components["art"]["conciergeMode"] !== true;
416+ var isConciergeMode = components["art"] && components["art"]["conciergeMode"] || false;
417+ var artAndSummary = hasArt && hasSummary && !isConciergeMode;
417418 var isHorizontal = template["card-layout"] === "horizontal";
418419 var hasBackground = (!isHorizontal && (template["card-background"] || components["background"] || artAndSummary)) ||
419420 (hasSummary && (template["card-background"] || components["background"]));
@@ -483,17 +484,21 @@ function cardString(template, components) {
483484 heightCode = 'width / artShape.aspect';
484485 }
485486
487+ var aspectRatio = components["art"] && components["art"]["aspect-ratio"] || 1;
488+ if (isNaN(aspectRatio)) {
489+ aspectRatio = 1;
490+ }
486491 var fallback = components["art"] && components["art"]["fallback"] || "";
487492 fallback = encodeURI(fallback);
488493 var fallbackStatusCode = "";
489494 var fallbackURICode = '""';
490495 if (fallback !== "") {
491− // fallbackStatusCode has %5 in it because we want to substitute it for fallbackURICode
492− // which in kArtShapeHolderCode is %5
493− fallbackStatusCode += 'onStatusChanged: if (status === Image.Error) source = %5;';
496+ // fallbackStatusCode has %6 in it because we want to substitute it for fallbackURICode
497+ // which in kArtShapeHolderCode is %7
498+ fallbackStatusCode += 'onStatusChanged: if (status === Image.Error) source = %7;';
494499 fallbackURICode = 'decodeURI("%1")'.arg(fallback);
495500 }
496− code += kArtShapeHolderCode.arg(artAnchors).arg(widthCode).arg(heightCode).arg(fallbackStatusCode).arg(fallbackURICode);
501+ code += kArtShapeHolderCode.arg(artAnchors).arg(widthCode).arg(heightCode).arg(isConciergeMode ? "false" : "true").arg(aspectRatio).arg(fallbackStatusCode).arg(fallbackURICode);
497502 } else {
498503 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
499504 }