@@ -204,10 +204,12 @@ var titleLabelCode = 'Label { \n\
204204 horizontalAlignment: root.headerAlignment; \n\
205205 }\n';
206206
207+// %1 is used as anchors of subtitleLabel
208+// %2 is used as color of subtitleLabel
207209var subtitleLabelCode = 'Label { \n\
208210 id: subtitleLabel; \n\
209211 objectName: "subtitleLabel"; \n\
210− %1 \n\
212+ anchors { %1 } \n\
211213 elide: Text.ElideRight; \n\
212214 fontSize: "small"; \n\
213215 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
@@ -381,7 +383,7 @@ function cardString(template, components) {
381383 if (hasMascot && hasSubtitle) {
382384 // Using row + column
383385 titleAnchors = 'anchors { left: parent.left; right: parent.right }\n';
384− subtitleAnchors = titleAnchors;
386+ subtitleAnchors = 'left: parent.left; right: parent.right';
385387 } else if (hasMascot) {
386388 // Using row + label
387389 titleAnchors = 'anchors.verticalCenter: parent.verticalCenter;\n'
@@ -399,11 +401,11 @@ function cardString(template, components) {
399401 titleAnchors += headerLeftAnchor;
400402 titleAnchors += headerVerticalAnchors;
401403 }
402− subtitleAnchors = 'anchors.left: titleLabel.left; \n\
403− anchors.leftMargin: titleLabel.leftMargin; \n\
404− anchors.right: titleLabel.right; \n\
405− anchors.top: titleLabel.bottom; \n\
406− anchors.topMargin: units.dp(2);\n';
404+ subtitleAnchors = 'left: titleLabel.left; \n\
405+ leftMargin: titleLabel.leftMargin; \n\
406+ right: titleLabel.right; \n\
407+ top: titleLabel.bottom; \n\
408+ topMargin: units.dp(2);\n';
407409 }
408410
409411 var titleLabelVisibleExtra = (headerAsOverlay ? '&& overlayLoader.active': '');