@@ -44,7 +44,7 @@ Item {
45 property real margins: units.gu(1)
45 property real margins: units.gu(1)
47− spacing: mascotShape.visible || mascotImage.visible || inOverlay ? margins : 0
47+ spacing: mascotShapeLoader.active || mascotImage.visible || inOverlay ? margins : 0
49 top: parent.top; left: parent.left; right: parent.right
49 top: parent.top; left: parent.left; right: parent.right
50 margins: margins
50 margins: margins
@@ -52,30 +52,33 @@ Item {
52 rightMargin: spacing
52 rightMargin: spacing
55− UbuntuShape {
55+ Loader {
56− id: mascotShape
56+ id: mascotShapeLoader
57− objectName: "mascotShape"
57+ objectName: "mascotShapeLoader"
59+ active: useMascotShape && mascotImage && mascotImage.status === Image.Ready
61+ anchors.verticalCenter: parent.verticalCenter
59 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
62 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
60 width: units.gu(6)
63 width: units.gu(6)
61 height: units.gu(5.625)
64 height: units.gu(5.625)
62− anchors.verticalCenter: parent.verticalCenter
63− visible: useMascotShape && image && image.status === Image.Ready
64 readonly property int maxSize: Math.max(width, height) * 4
65 readonly property int maxSize: Math.max(width, height) * 4
67+ sourceComponent: UbuntuShape {
66− image: useMascotShape ? mascotImage : null
68+ image: useMascotShape ? mascotImage : null
70 id: mascotImage
73 id: mascotImage
71 objectName: "mascotImage"
74 objectName: "mascotImage"
73− width: source ? mascotShape.width : 0
76+ width: source ? mascotShapeLoader.width : 0
74− height: mascotShape.height
77+ height: mascotShapeLoader.height
75 anchors.verticalCenter: parent.verticalCenter
78 anchors.verticalCenter: parent.verticalCenter
76 visible: !useMascotShape && status === Image.Ready
79 visible: !useMascotShape && status === Image.Ready
78− sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
81+ sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
79 fillMode: Image.PreserveAspectCrop
82 fillMode: Image.PreserveAspectCrop
80 horizontalAlignment: Image.AlignHCenter
83 horizontalAlignment: Image.AlignHCenter
81 verticalAlignment: Image.AlignVCenter
84 verticalAlignment: Image.AlignVCenter