@@ -155,7 +155,7 @@ var kOverlayLoaderCode = 'Loader { \n\
156// multiple row version of HeaderRowCode
156// multiple row version of HeaderRowCode
157function kHeaderRowCodeGenerator() {
157function kHeaderRowCodeGenerator() {
158−var kHeaderRowCodeTemplate = 'Row { \n\
158+ var kHeaderRowCodeTemplate = 'Row { \n\
159 id: row; \n\
159 id: row; \n\
160 objectName: "outerRow"; \n\
160 objectName: "outerRow"; \n\
161 property real margins: units.gu(1); \n\
161 property real margins: units.gu(1); \n\
@@ -220,6 +220,7 @@ var kMascotImageCode = 'CroppedImageMinimumSourceSize { \n\
220// %1 is used as anchors of titleLabel
220// %1 is used as anchors of titleLabel
221// %2 is used as color of titleLabel
221// %2 is used as color of titleLabel
222// %3 is used as extra condition for visible of titleLabel
222// %3 is used as extra condition for visible of titleLabel
223+// %4 is used as title width
223var kTitleLabelCode = 'Label { \n\
224var kTitleLabelCode = 'Label { \n\
224 id: titleLabel; \n\
225 id: titleLabel; \n\
225 objectName: "titleLabel"; \n\
226 objectName: "titleLabel"; \n\
@@ -231,6 +232,7 @@ var kTitleLabelCode = 'Label { \n\
231 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
232 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
232 color: %2; \n\
233 color: %2; \n\
233 visible: showHeader %3; \n\
234 visible: showHeader %3; \n\
234 text: root.title; \n\
236 text: root.title; \n\
235 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal; \n\
237 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal; \n\
236 horizontalAlignment: root.titleAlignment; \n\
238 horizontalAlignment: root.titleAlignment; \n\
@@ -499,6 +501,7 @@ function cardString(template, components) {
499 var attributesAnchors;
501 var attributesAnchors;
500 var titleContainerAnchors;
502 var titleContainerAnchors;
501 var titleRightAnchor;
503 var titleRightAnchor;
504+ var titleWidth = "undefined";
503 var extraRightAnchor = '';
506 var extraRightAnchor = '';
504 var extraLeftAnchor = '';
507 var extraLeftAnchor = '';
@@ -542,8 +545,9 @@ function cardString(template, components) {
542 attributesAnchors = subtitleAnchors + 'top: titleLabel.bottom;\n';
545 attributesAnchors = subtitleAnchors + 'top: titleLabel.bottom;\n';
544 } else if (hasMascot) {
547 } else if (hasMascot) {
545− // Using row + titleContainer
548+ // Using row without titleContainer
546 titleAnchors = 'verticalCenter: parent.verticalCenter;\n';
549 titleAnchors = 'verticalCenter: parent.verticalCenter;\n';
550+ titleWidth = "parent.width - x";
548 if (headerAsOverlay) {
552 if (headerAsOverlay) {
549 // Using anchors to the overlay
553 // Using anchors to the overlay
@@ -581,7 +585,7 @@ function cardString(template, components) {
582 // code for different elements
586 // code for different elements
583 var titleLabelVisibleExtra = (headerAsOverlay ? '&& overlayLoader.active': '');
587 var titleLabelVisibleExtra = (headerAsOverlay ? '&& overlayLoader.active': '');
584− var titleCode = kTitleLabelCode.arg(titleAnchors).arg(titleColor).arg(titleLabelVisibleExtra);
588+ var titleCode = kTitleLabelCode.arg(titleAnchors).arg(titleColor).arg(titleLabelVisibleExtra).arg(titleWidth);
585 var subtitleCode;
589 var subtitleCode;
586 var attributesCode;
590 var attributesCode;