on xenial help sign in
Fix GridLayout height sometimes 0.
commit4a9c7329bce13257487fe574a0c06563098a85d4 authorYing-Chun Liu <paul.liu@canonical.com> dateThu 24 Jul 2014, 21:47 (12 years ago) parent27aabf6
1 file changed+2−2
plugins/Dash/CardCreator.js+2−2
plugins/Dash/CardCreator.js+2−2
@@ -564,7 +564,7 @@ function cardString(template, components) {
564564 color = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
565565 }
566566
567− var summaryTopMargin = (hasMascot || hasSubtitle ? 'anchors.margins' : '0');
567+ var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
568568
569569 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);
570570 }
@@ -576,7 +576,7 @@ function cardString(template, components) {
576576 } else if (hasMascot) {
577577 code += 'implicitHeight: mascotImage.y + mascotImage.height;\n';
578578 } else if (hasAttributes) {
579− code += 'implicitHeight: attributesRow.y + attributesRow.height + units.gu(1);\n';
579+ code += 'implicitHeight: attributesRow.y + Math.max(attributesRow.height, attributesRow.childrenRect.height, attributesRow.implicitHeight, units.gu(2)) + units.gu(1);\n';
580580 } else if (hasSubtitle) {
581581 code += 'implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
582582 } else if (hasTitle) {