@@ -190,9 +190,10 @@ var kAudioButtonCode = 'AbstractButton { \n\
190190 }';
191191
192192// %1 is whether the loader should be asynchronous or not
193+// %2 is the header height code
193194var kOverlayLoaderCode = 'Loader { \n\
194195 id: overlayLoader; \n\
195− readonly property real overlayHeight: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2); \n\
196+ readonly property real overlayHeight: %2 + units.gu(2); \n\
196197 anchors.fill: artShapeHolder; \n\
197198 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
198199 asynchronous: %1; \n\
@@ -214,17 +215,19 @@ function kHeaderRowCodeGenerator() {
214215 objectName: "outerRow"; \n\
215216 property real margins: units.gu(1); \n\
216217 spacing: margins; \n\
217− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight; \n\
218+ %2\
218219 anchors { %1 } \n\
219220 anchors.right: parent.right; \n\
220221 anchors.margins: margins; \n\
221222 anchors.rightMargin: 0; \n\
222223 data: [ \n\
223− %2 \n\
224+ %3 \n\
224225 ] \n\
225226 }\n';
226227 var args = Array.prototype.slice.call(arguments);
227− var code = kHeaderRowCodeTemplate.arg(args.shift()).arg(args.join(',\n'));
228+ var isCardTool = args.shift();
229+ var heightCode = isCardTool ? "" : "height: root.fixedHeaderHeight; \n";
230+ var code = kHeaderRowCodeTemplate.arg(args.shift()).arg(heightCode).arg(args.join(',\n'));
228231 return code;
229232}
230233
@@ -415,7 +418,7 @@ function cardString(template, components, isCardTool) {
415418 property string backgroundShapeStyle: "inset"; \n\
416419 property real fontScale: 1.0; \n\
417420 property var scopeStyle: null; \n\
418− property int fixedHeaderHeight: -1; \n\
421+ %2\
419422 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
420423 readonly property string title: cardData && cardData["title"] || ""; \n\
421424 property bool showHeader: true; \n\
@@ -423,6 +426,8 @@ function cardString(template, components, isCardTool) {
423426 enabled: %1; \n\
424427 \n'.arg(templateInteractive);
425428
429+ code = code.arg(isCardTool ? "" : "property int fixedHeaderHeight: -1; \n");
430+
426431 var hasArt = components["art"] && components["art"]["field"] || false;
427432 var hasSummary = components["summary"] || false;
428433 var isConciergeMode = components["art"] && components["art"]["conciergeMode"] || false;
@@ -524,7 +529,8 @@ function cardString(template, components, isCardTool) {
524529 }
525530
526531 if (headerAsOverlay) {
527− code += kOverlayLoaderCode.arg(asynchronous);
532+ var headerHeightCode = isCardTool ? "headerHeight" : "root.fixedHeaderHeight";
533+ code += kOverlayLoaderCode.arg(asynchronous).arg(headerHeightCode);
528534 }
529535
530536 var headerVerticalAnchors;
@@ -785,7 +791,7 @@ function cardString(template, components, isCardTool) {
785791 if (mascotShapeCode != '') {
786792 rowCode.unshift(mascotShapeCode);
787793 }
788− code += kHeaderRowCodeGenerator(headerVerticalAnchors + headerLeftAnchor, rowCode)
794+ code += kHeaderRowCodeGenerator(isCardTool, headerVerticalAnchors + headerLeftAnchor, rowCode)
789795 } else {
790796 code += mascotShapeCode + mascotCode + titleSubtitleCode;
791797 }
@@ -809,7 +815,8 @@ function cardString(template, components, isCardTool) {
809815 } else {
810816 audioButtonAnchorsFill = 'undefined';
811817 audioButtonWidth = 'height';
812− audioButtonHeight = '(root.fixedHeaderHeight > 0 ? root.fixedHeaderHeight : headerHeight) + 2 * units.gu(1)';
818+ audioButtonHeight = isCardTool ? 'headerHeight + 2 * units.gu(1)'
819+ : 'root.fixedHeaderHeight + 2 * units.gu(1)';
813820 }
814821 code += kAudioButtonCode.arg(audioButtonAnchorsFill).arg(audioButtonWidth).arg(audioButtonHeight);
815822 }