@@ -20,7 +20,6 @@ import "Animations"
2020Item {
2121 id: container
2222 property Item surface: null
23− readonly property alias surfaceArea: _surfaceArea
2423 property bool removing: false
2524
2625 onSurfaceChanged: {
@@ -31,12 +30,6 @@ Item {
3130 }
3231 }
3332
34− Rectangle {
35− id: _surfaceArea
36− anchors.fill: parent
37− color: Qt.rgba(0,0,0,0)
38− }
39−
4033 Connections {
4134 target: surface
4235 onRemoved: {
@@ -63,7 +56,13 @@ Item {
6356
6457 delegate: Loader {
6558 z: 2
66− anchors.fill: surfaceArea
59+ anchors {
60+ fill: container
61+ topMargin: container.surface.anchors.topMargin
62+ rightMargin: container.surface.anchors.rightMargin
63+ bottomMargin: container.surface.anchors.bottomMargin
64+ leftMargin: container.surface.anchors.leftMargin
65+ }
6766
6867 // Only way to do recursive qml items.
6968 source: Qt.resolvedUrl("SurfaceContainer.qml")
@@ -76,7 +75,7 @@ Item {
7675 }
7776
7877 function animateIn(component) {
79− var animation = component.createObject(container, { "surface": container.surface, "surfaceArea": container.surfaceArea });
78+ var animation = component.createObject(container, { "surface": container.surface, "surfaceArea": container });
8079 animation.start();
8180
8281 var tmp = d.animations;
@@ -117,7 +116,7 @@ Item {
117116 states: [
118117 State {
119118 name: "initial"
120− PropertyChanges { target: surface; anchors.fill: surfaceArea }
119+ PropertyChanges { target: surface; anchors.fill: container }
121120 }
122121 // TODO: more animations!
123122 ]