@@ -285,15 +285,6 @@ function createCardComponent(parent, template, components) {
285285 color = '"grey"';
286286 }
287287
288− var anchors = "anchors.right: parent.right;";
289− if (hasMascot) {
290− anchors += 'anchors.left: mascotImage.right; \
291− anchors.leftMargin: units.gu(1);';
292− } else {
293− anchors += headerLeftAnchor;
294− }
295− anchors += headerVerticalAnchors;
296−
297288 var titleAnchors = "";
298289 var subtitleAnchors = "";
299290 if (hasMascot && hasSubtitle) {
@@ -305,8 +296,24 @@ function createCardComponent(parent, template, components) {
305296 width: parent.width - x;';
306297 } else if (hasMascot) {
307298 titleAnchors = 'anchors.verticalCenter: parent.verticalCenter;'
299+ } else if (inOverlay && hasSubtitle) {
300+ titleAnchors = 'anchors.right: parent.right; \
301+ anchors.bottom: subtitleLabel.top; \
302+ anchors.bottomMargin: units.dp(2);';
303+ titleAnchors += headerLeftAnchor;
304+ subtitleAnchors = 'anchors.left: titleLabel.left; \
305+ anchors.leftMargin: titleLabel.leftMargin; \
306+ anchors.right: titleLabel.right;';
307+ subtitleAnchors += headerVerticalAnchors;
308308 } else {
309− titleAnchors = anchors;
309+ titleAnchors = "anchors.right: parent.right;";
310+ if (hasMascot) {
311+ titleAnchors += 'anchors.left: mascotImage.right; \
312+ anchors.leftMargin: units.gu(1);';
313+ } else {
314+ titleAnchors += headerLeftAnchor;
315+ }
316+ titleAnchors += headerVerticalAnchors;
310317 subtitleAnchors = 'anchors.left: titleLabel.left; \
311318 anchors.leftMargin: titleLabel.leftMargin; \
312319 anchors.right: titleLabel.right; \
@@ -357,7 +364,8 @@ function createCardComponent(parent, template, components) {
357364
358365 if (hasSummary) {
359366 var summaryTopAnchor;
360− if (isHorizontal) summaryTopAnchor = "artShapeHolder.bottom";
367+ if (isHorizontal && hasArt) summaryTopAnchor = "artShapeHolder.bottom";
368+ else if (inOverlay && hasArt) summaryTopAnchor = "artShapeHolder.bottom";
361369 else if (hasHeaderRow) summaryTopAnchor = "row.bottom";
362370 else if (hasMascot) summaryTopAnchor = "mascotImage.bottom";
363371 else if (hasSubtitle) summaryTopAnchor = "subtitleLabel.bottom";