@@ -139,6 +139,8 @@ function createCardComponent(parent, template, components) {
139139 } \
140140 } \
141141 }'
142+ } else {
143+ code += 'readonly property size artShapeSize: Qt.size(-1, -1);'
142144 }
143145
144146 if (inOverlay) {
@@ -199,8 +201,13 @@ function createCardComponent(parent, template, components) {
199201 headerVerticalAnchors = 'anchors.bottom: artShapeHolder.bottom; \
200202 anchors.bottomMargin: units.gu(1);';
201203 } else {
202− headerVerticalAnchors = 'anchors.top: artShapeHolder.bottom; \
203− anchors.topMargin: units.gu(1);';
204+ if (hasArt) {
205+ headerVerticalAnchors = 'anchors.top: artShapeHolder.bottom; \
206+ anchors.topMargin: units.gu(1);';
207+ } else {
208+ headerVerticalAnchors = 'anchors.top: parent.top; \
209+ anchors.topMargin: units.gu(1);';
210+ }
204211 }
205212 }
206213
@@ -265,8 +272,7 @@ function createCardComponent(parent, template, components) {
265272 anchors += 'anchors.left: mascotImage.right; \
266273 anchors.leftMargin: units.gu(1);';
267274 } else {
268− anchors += 'anchors.left: parent.left; \
269− anchors.leftMargin: units.gu(1);';
275+ anchors += 'anchors.left: parent.left;';
270276 }
271277 anchors += headerVerticalAnchors;
272278
@@ -274,6 +280,7 @@ function createCardComponent(parent, template, components) {
274280 var subtitleAnchors = "";
275281 if (hasMascot && hasSubtitle) {
276282 titleAnchors = 'anchors { left: parent.left; right: parent.right }';
283+ subtitleAnchors = titleAnchors;
277284 code += 'Item { \
278285 ' + anchors + '\
279286 height: mascotImage.height; \
@@ -284,7 +291,7 @@ function createCardComponent(parent, template, components) {
284291 } else {
285292 titleAnchors = anchors;
286293 subtitleAnchors = 'anchors.left: parent.left; \
287− anchors.leftMargin: units.gu(1); \
294+ anchors.right: parent.right; \
288295 anchors.top: titleLabel.bottom; \
289296 anchors.topMargin: units.dp(2);';
290297 }