@@ -37,7 +37,8 @@ Item {
3737 property alias horizontalAlignment: image.horizontalAlignment
3838 property alias verticalAlignment: image.verticalAlignment
3939 property alias sourceImage: image
40− property alias borderSource: shape.borderSource
40+ property bool useUbuntuShape: true
41+ property string borderSource: "radius_idle.sci"
4142
4243 state: "default"
4344
@@ -78,7 +79,7 @@ Item {
7879 }
7980 }
8081
81− UbuntuShape {
82+ Loader {
8283 id: shape
8384 objectName: "shape"
8485 height: root.initialHeight
@@ -88,13 +89,22 @@ Item {
8889 opacity: 0
8990 visible: opacity != 0
9091
91− image: Image {
92+ sourceComponent: useUbuntuShape ? ubuntuShapeComponent : itemComponent
93+ onLoaded: {
94+ if (sourceComponent === ubuntuShapeComponent) {
95+ item.image = image;
96+ item.borderSource = Qt.binding(function() { return root.borderSource })
97+ }
98+ }
99+
100+ Image {
92101 id: image
93102 objectName: "image"
94103
95104 property url nextSource
96105 property string format: image.implicitWidth > image.implicitHeight ? "landscape" : "portrait"
97106
107+ visible: !useUbuntuShape
98108 fillMode: Image.PreserveAspectFit
99109 asynchronous: true
100110 cache: false
@@ -109,6 +119,16 @@ Item {
109119 }
110120 }
111121
122+ Component {
123+ id: itemComponent
124+ Item {}
125+ }
126+
127+ Component {
128+ id: ubuntuShapeComponent
129+ UbuntuShape {}
130+ }
131+
112132 states: [
113133 State {
114134 name: "default"