@@ -222,6 +222,14 @@ function cardString(template, components) {
222 ' + headerLeftAnchor + '\
222 ' + headerLeftAnchor + '\
223 anchors.right: parent.right; \
223 anchors.right: parent.right; \
224 anchors.margins: margins;';
224 anchors.margins: margins;';
225+ } else if (hasMascot) {
226+ code += 'readonly property int headerHeight: mascotImage.height + units.gu(1) * 2;'
227+ } else if (hasSubtitle) {
228+ code += 'readonly property int headerHeight: subtitleLabel.y + subtitleLabel.height - titleLabel.y + titleLabel.anchors.topMargin * 2 + subtitleLabel.anchors.topMargin;'
229+ } else if (hasTitle) {
230+ code += 'readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2;'
232+ code += 'readonly property int headerHeight: 0;'
227 if (hasMascot) {
235 if (hasMascot) {
@@ -231,7 +239,6 @@ function cardString(template, components) {
231 anchors += headerLeftAnchor;
239 anchors += headerLeftAnchor;
232 anchors += 'anchors.leftMargin: units.gu(1);'
240 anchors += 'anchors.leftMargin: units.gu(1);'
233 anchors += headerVerticalAnchors;
241 anchors += headerVerticalAnchors;
234− code += 'readonly property int headerHeight: mascotImage.height + units.gu(1) * 2;'
236 anchors = "anchors.verticalCenter: parent.verticalCenter;"
243 anchors = "anchors.verticalCenter: parent.verticalCenter;"
@@ -317,13 +324,6 @@ function cardString(template, components) {
317 anchors.top: titleLabel.bottom; \
324 anchors.top: titleLabel.bottom; \
318 anchors.topMargin: units.dp(2);';
325 anchors.topMargin: units.dp(2);';
320− if (!hasHeaderRow) {
322− code += 'readonly property int headerHeight: subtitleLabel.y + subtitleLabel.height - titleLabel.y + titleLabel.anchors.topMargin * 2 + subtitleLabel.anchors.topMargin;'
324− code += 'readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2;'
328 code += 'Label { \
328 code += 'Label { \
329 id: titleLabel; \
329 id: titleLabel; \