so, it broke here:
=== modified file modules/Ubuntu/Components/Icon10.qml --- modules/Ubuntu/Components/Icon10.qml 2014-08-21 13:59:24 +0000 +++ modules/Ubuntu/Components/Icon10.qml 2014-09-02 09:39:09 +0000 @@ -34,42 +34,16 @@ Image { id: image objectName: "image" - anchors.fill: parent - - /* Necessary so that icons are not loaded before a size is set. */ - source: "" - sourceSize { - width: 0 - height: 0 - } - - Component.onCompleted: update() - onWidthChanged: update() - onHeightChanged: update() - Connections { - target: icon - ignoreUnknownSignals: true - onNameChanged: image.update() - onSourceChanged: image.update() - } - - function update() { - // only set sourceSize.width, sourceSize.height and source when - // icon dimensions are valid, see bug #1349769. - if (width > 0 && height > 0 - && (icon.name || (icon.hasOwnProperty("source") && icon.source))) { - sourceSize.width = width; - sourceSize.height = height; - if (icon.hasOwnProperty("source")) { - source = icon.source; - } else { - source = "image://theme/%1".arg(icon.name); - } - } else { - source = ""; - sourceSize.width = 0; - sourceSize.height = 0; - } + anchors { top: parent.top; bottom: parent.bottom } + fillMode: Image.PreserveAspectFit; + sourceSize.height: height + source: { + if (icon.name) + return "image://theme/%1".arg(icon.name); + else if (icon.hasOwnProperty("source")) + return icon.source; + else + return ""; }
cache: true
so, it broke here:
=== modified file modules/ Ubuntu/ Components/ Icon10. qml Ubuntu/ Components/ Icon10. qml 2014-08-21 13:59:24 +0000 Ubuntu/ Components/ Icon10. qml 2014-09-02 09:39:09 +0000
objectName: "image" onCompleted: update() gnals: true perty(" source" ) && icon.source))) { perty(" source" )) { //theme/ %1".arg( icon.name) ; spectFit; //theme/ %1".arg( icon.name) ; perty(" source" ))
--- modules/
+++ modules/
@@ -34,42 +34,16 @@
Image {
id: image
- anchors.fill: parent
-
- /* Necessary so that icons are not loaded before a size is set. */
- source: ""
- sourceSize {
- width: 0
- height: 0
- }
-
- Component.
- onWidthChanged: update()
- onHeightChanged: update()
- Connections {
- target: icon
- ignoreUnknownSi
- onNameChanged: image.update()
- onSourceChanged: image.update()
- }
-
- function update() {
- // only set sourceSize.width, sourceSize.height and source when
- // icon dimensions are valid, see bug #1349769.
- if (width > 0 && height > 0
- && (icon.name || (icon.hasOwnPro
- sourceSize.width = width;
- sourceSize.height = height;
- if (icon.hasOwnPro
- source = icon.source;
- } else {
- source = "image:
- }
- } else {
- source = "";
- sourceSize.width = 0;
- sourceSize.height = 0;
- }
+ anchors { top: parent.top; bottom: parent.bottom }
+ fillMode: Image.PreserveA
+ sourceSize.height: height
+ source: {
+ if (icon.name)
+ return "image:
+ else if (icon.hasOwnPro
+ return icon.source;
+ else
+ return "";
}
cache: true