on xenial help sign in
Protect against SVG
commit8c77d71e011ffb836b8a8c5603e3c6b5e8bb8707 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 12 Feb 2015, 16:25 (12 years ago) parent8e50c6e
3 files changed+3−3
plugins/Dash/CardAttributes.qml+1−1 plugins/Dash/CardCreator.js+1−1 qml/Panel/IndicatorItem.qml+1−1
plugins/Dash/CardAttributes.qml+1−1
@@ -49,7 +49,7 @@ GridLayout {
4949 Icon {
5050 id: icon
5151 height: units.gu(2)
52− width: implicitWidth / implicitHeight * height
52+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
5353 source: "icon" in modelData && modelData["icon"] || ""
5454 color: grid.color
5555 }
plugins/Dash/CardCreator.js+1−1
@@ -235,7 +235,7 @@ var kEmblemIconCode = 'Icon { \n\
235235 source: cardData && cardData["emblem"] || ""; \n\
236236 color: %2; \n\
237237 height: source != "" ? titleLabel.font.pixelSize : 0; \n\
238− width: implicitWidth / implicitHeight * height; \n\
238+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth; \n\
239239 }\n';
240240
241241// %1 is used as anchors of touchdown effect
qml/Panel/IndicatorItem.qml+1−1
@@ -95,7 +95,7 @@ IndicatorDelegate {
9595 id: itemImage
9696 objectName: "icon"+index
9797 height: iconHeight
98− width: implicitWidth / implicitHeight * height
98+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth;
9999 source: modelData
100100 color: root.color
101101 Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }