@@ -43,28 +43,36 @@ 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(icon.width, label.x + label.implicitWidth)
46+ Layout.maximumWidth: Math.max(iconLoader.width, labelLoader.x + labelLoader.implicitWidth)
4747 Layout.fillWidth: true
4848 height: units.gu(2)
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
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+ }
5660 }
57− Label {
58− id: label
61+ Loader {
62+ id: labelLoader
5963 width: parent.width - x
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
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+ }
6876 }
6977 }
7078 }