on xenial help sign in
Add explanations for the width: code
commit37d25d55aff24c20195291e9a85519a7e2e4dfc4 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 12 Feb 2015, 17:28 (12 years ago) parent8c77d71
3 files changed+4
plugins/Dash/CardAttributes.qml+1 plugins/Dash/CardCreator.js+2 qml/Panel/IndicatorItem.qml+1
plugins/Dash/CardAttributes.qml+1
@@ -49,6 +49,7 @@ GridLayout {
4949 Icon {
5050 id: icon
5151 height: units.gu(2)
52+ // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
5253 width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
5354 source: "icon" in modelData && modelData["icon"] || ""
5455 color: grid.color
plugins/Dash/CardCreator.js+2
@@ -224,6 +224,8 @@ var kTitleLabelCode = 'Label { \n\
224224
225225// %1 is used as extra anchors of emblemIcon
226226// %2 is used as color of emblemIcon
227+// FIXME The width code is a
228+// Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
227229var kEmblemIconCode = 'Icon { \n\
228230 id: emblemIcon; \n\
229231 objectName: "emblemIcon"; \n\
qml/Panel/IndicatorItem.qml+1
@@ -95,6 +95,7 @@ IndicatorDelegate {
9595 id: itemImage
9696 objectName: "icon"+index
9797 height: iconHeight
98+ // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
9899 width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth;
99100 source: modelData
100101 color: root.color