@@ -278,6 +278,7 @@ var kAttributesRowCode = 'CardAttributes { \n\
278 id: attributesRow; \n\
278 id: attributesRow; \n\
279 objectName: "attributesRow"; \n\
279 objectName: "attributesRow"; \n\
280 anchors { %1 } \n\
280 anchors { %1 } \n\
281 model: cardData["attributes"] \n\
282 model: cardData["attributes"] \n\
@@ -472,11 +473,13 @@ function cardString(template, components) {
472 titleAnchors = 'left: parent.left; \n\
473 titleAnchors = 'left: parent.left; \n\
473 leftMargin: units.gu(1); \n\
474 leftMargin: units.gu(1); \n\
474 right: parent.right; \n\
475 right: parent.right; \n\
476+ rightMargin: units.gu(1); \n\
475 top: overlayLoader.top; \n\
477 top: overlayLoader.top; \n\
476 topMargin: units.gu(1);\n';
478 topMargin: units.gu(1);\n';
478 // Using anchors to the mascot/parent
480 // Using anchors to the mascot/parent
479− titleAnchors = "right: parent.right;";
481+ titleAnchors = "right: parent.right;\n";
482+ titleAnchors += "rightMargin: units.gu(1);\n";
480 titleAnchors += headerLeftAnchor;
483 titleAnchors += headerLeftAnchor;
481 titleAnchors += headerVerticalAnchors;
484 titleAnchors += headerVerticalAnchors;
482 if (!headerLeftAnchorHasMargin) {
485 if (!headerLeftAnchorHasMargin) {
@@ -486,12 +489,14 @@ function cardString(template, components) {
486 subtitleAnchors = 'left: titleLabel.left; \n\
489 subtitleAnchors = 'left: titleLabel.left; \n\
487 leftMargin: titleLabel.leftMargin; \n\
490 leftMargin: titleLabel.leftMargin; \n\
488 right: titleLabel.right; \n\
491 right: titleLabel.right; \n\
492+ rightMargin: titleLabel.rightMargin; \n\
489 top: titleLabel.bottom; \n\
493 top: titleLabel.bottom; \n\
490 topMargin: units.dp(2);\n';
494 topMargin: units.dp(2);\n';
491 if (hasSubtitle) {
495 if (hasSubtitle) {
492 attributesAnchors = 'left: subtitleLabel.left; \n\
496 attributesAnchors = 'left: subtitleLabel.left; \n\
493 leftMargin: subtitleLabel.leftMargin; \n\
497 leftMargin: subtitleLabel.leftMargin; \n\
494 right: subtitleLabel.right; \n\
498 right: subtitleLabel.right; \n\
499+ rightMargin: subtitleLabel.rightMargin; \n\
495 top: subtitleLabel.bottom; \n\
500 top: subtitleLabel.bottom; \n\
496 topMargin: units.dp(2);\n';
501 topMargin: units.dp(2);\n';
@@ -510,12 +515,12 @@ function cardString(template, components) {
510 // If using row + column wrap the code in the column
515 // If using row + column wrap the code in the column
511 titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(subtitleCode);
516 titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(subtitleCode);
512 if (hasSubtitle && hasAttributes) {
517 if (hasSubtitle && hasAttributes) {
513− var attributesCode = kAttributesRowCode.arg(attributesAnchors);
518+ var attributesCode = kAttributesRowCode.arg(attributesAnchors).arg(color);
514 titleSubtitleCode = kHeaderColumnCodeGenerator(titleCode, subtitleCode, attributesCode);
519 titleSubtitleCode = kHeaderColumnCodeGenerator(titleCode, subtitleCode, attributesCode);
515 } else if (hasSubtitle) {
520 } else if (hasSubtitle) {
516 titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(subtitleCode);
521 titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(subtitleCode);
517 } else if (hasAttributes) {
522 } else if (hasAttributes) {
518− var attributesCode = kAttributesRowCode.arg(attributesAnchors);
523+ var attributesCode = kAttributesRowCode.arg(attributesAnchors).arg(color);
519 titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(attributesCode);
524 titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(attributesCode);
@@ -524,7 +529,7 @@ function cardString(template, components) {
524 titleSubtitleCode = titleSubtitleCode + subtitleCode;
529 titleSubtitleCode = titleSubtitleCode + subtitleCode;
526 if (hasAttributes) {
531 if (hasAttributes) {
527− var attributesCode = kAttributesRowCode.arg(attributesAnchors);
532+ var attributesCode = kAttributesRowCode.arg(attributesAnchors).arg(color);
528 titleSubtitleCode = titleSubtitleCode + attributesCode;
533 titleSubtitleCode = titleSubtitleCode + attributesCode;