on xenial help sign in
Revert change infected from other branch
commitca56b581ceffdca87fc681b6fa2fbae24e846c78 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 24 May 2016, 12:44 (10 years ago) parentb3f04a9
1 file changed+18−26
plugins/Dash/CardAttributes.qml+18−26
plugins/Dash/CardAttributes.qml+18−26
@@ -43,36 +43,28 @@ GridLayout {
4343 Layout.column: index % grid.columns
4444 Layout.row: index / grid.columns
4545 Layout.columnSpan: index == repeater.count - 1 && grid.columns == 3 && column == 1 ? 2 : 1
46− Layout.maximumWidth: Math.max(iconLoader.width, labelLoader.x + labelLoader.implicitWidth)
46+ Layout.maximumWidth: Math.max(icon.width, label.x + label.implicitWidth)
4747 Layout.fillWidth: true
4848 height: units.gu(2)
49− Loader {
50− id: iconLoader
51− readonly property string source: "icon" in modelData && modelData["icon"] || ""
52− active: source !== ""
53− sourceComponent: Icon {
54− height: units.gu(2)
55− // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
56− width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
57− source: parent.source
58− color: grid.color
59− }
49+ Icon {
50+ id: icon
51+ height: units.gu(2)
52+ // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
53+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
54+ source: "icon" in modelData && modelData["icon"] || ""
55+ color: grid.color
6056 }
61− Loader {
62− id: labelLoader
57+ Label {
58+ id: label
6359 width: parent.width - x
64− readonly property string value: "value" in modelData && modelData["value"] || ""
65− active: value !== ""
66− sourceComponent: Label {
67− anchors.verticalCenter: parent.verticalCenter
68− text: parent.value
69− elide: Text.ElideRight
70− maximumLineCount: 1
71− font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
72− fontSize: "small"
73− font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
74− color: grid.color
75− }
60+ anchors.verticalCenter: parent.verticalCenter
61+ text: "value" in modelData && modelData["value"] || "";
62+ elide: Text.ElideRight
63+ maximumLineCount: 1
64+ font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
65+ fontSize: "small"
66+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
67+ color: grid.color
7668 }
7769 }
7870 }