on xenial help sign in
Protect against SVG
8c77d71Albert Astals Cid
plugins/Dash/CardAttributes.qml+1−1
@@ -49,7 +49,7 @@ GridLayout {
49 Icon {
49 Icon {
50 id: icon
50 id: icon
51 height: units.gu(2)
51 height: units.gu(2)
52− width: implicitWidth / implicitHeight * height
52+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
53 source: "icon" in modelData && modelData["icon"] || ""
53 source: "icon" in modelData && modelData["icon"] || ""
54 color: grid.color
54 color: grid.color
55 }
55 }
plugins/Dash/CardCreator.js+1−1
@@ -235,7 +235,7 @@ var kEmblemIconCode = 'Icon { \n\
235 source: cardData && cardData["emblem"] || ""; \n\
235 source: cardData && cardData["emblem"] || ""; \n\
236 color: %2; \n\
236 color: %2; \n\
237 height: source != "" ? titleLabel.font.pixelSize : 0; \n\
237 height: source != "" ? titleLabel.font.pixelSize : 0; \n\
238− width: implicitWidth / implicitHeight * height; \n\
238+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth; \n\
239 }\n';
239 }\n';
240
240
241// %1 is used as anchors of touchdown effect
241// %1 is used as anchors of touchdown effect
qml/Panel/IndicatorItem.qml+1−1
@@ -95,7 +95,7 @@ IndicatorDelegate {
95 id: itemImage
95 id: itemImage
96 objectName: "icon"+index
96 objectName: "icon"+index
97 height: iconHeight
97 height: iconHeight
98− width: implicitWidth / implicitHeight * height
98+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth;
99 source: modelData
99 source: modelData
100 color: root.color
100 color: root.color
101 Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }
101 Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }