on xenial help sign in
Revert workarounds.
13581a6Ying-Chun Liu
plugins/Dash/CardCreator.js+1−1
@@ -576,7 +576,7 @@ function cardString(template, components) {
576 } else if (hasMascot) {
576 } else if (hasMascot) {
577 code += 'implicitHeight: mascotImage.y + mascotImage.height;\n';
577 code += 'implicitHeight: mascotImage.y + mascotImage.height;\n';
578 } else if (hasAttributes) {
578 } else if (hasAttributes) {
579− code += 'implicitHeight: attributesRow.y + Math.max(attributesRow.height, attributesRow.childrenRect.height, attributesRow.implicitHeight, units.gu(2)) + units.gu(1);\n';
579+ code += 'implicitHeight: attributesRow.y + attributesRow.height + units.gu(1);\n';
580 } else if (hasSubtitle) {
580 } else if (hasSubtitle) {
581 code += 'implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
581 code += 'implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
582 } else if (hasTitle) {
582 } else if (hasTitle) {
qml/Dash/CardTool.qml+3−2
@@ -167,13 +167,14 @@ Item {
167
167
168 Loader {
168 Loader {
169 id: cardLoader
169 id: cardLoader
170− property var fields: ["art", "mascot", "title", "subtitle", "summary"]
170+ property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
171 property var maxData: {
171 property var maxData: {
172 "art": Qt.resolvedUrl("graphics/checkers.png"),
172 "art": Qt.resolvedUrl("graphics/checkers.png"),
173 "mascot": Qt.resolvedUrl("graphics/checkers.png"),
173 "mascot": Qt.resolvedUrl("graphics/checkers.png"),
174 "title": "—\n—",
174 "title": "—\n—",
175 "subtitle": "—",
175 "subtitle": "—",
176− "summary": "—\n—\n—\n—\n—"
176+ "summary": "—\n—\n—\n—\n—",
177+ "attributes": [{"value":"text1","icon":"image://theme/ok"},{"value":"text2","icon":"image://theme/cancel"},{"value":"text3","icon":"image://theme/ok"}]
177 }
178 }
178 sourceComponent: cardTool.cardComponent
179 sourceComponent: cardTool.cardComponent
179 onLoaded: {
180 onLoaded: {
tests/qmltests/Dash/tst_Card.qml+1
@@ -111,6 +111,7 @@ Rectangle {
111 anchors { top: parent.top; left: parent.left; margins: units.gu(1) }
111 anchors { top: parent.top; left: parent.left; margins: units.gu(1) }
112
112
113 sourceComponent: cardTool.cardComponent
113 sourceComponent: cardTool.cardComponent
114+ clip: true
114 onLoaded: {
115 onLoaded: {
115 item.template = Qt.binding(function() { return cardTool.template; });
116 item.template = Qt.binding(function() { return cardTool.template; });
116 item.components = Qt.binding(function() { return cardTool.components; });
117 item.components = Qt.binding(function() { return cardTool.components; });