@@ -23,6 +23,8 @@ import Unity.Application 0.1 // for MirSurfaceItem
2323FocusScope {
2424 id: root
2525 objectName: "surfaceContainer"
26+ implicitWidth: surfaceItem.implicitWidth
27+ implicitHeight: surfaceItem.implicitHeight
2628
2729 // Must be set from outside
2830 property var surface: null
@@ -42,6 +44,16 @@ FocusScope {
4244 surfaceItem.surface = surface;
4345 }
4446
47+ onImplicitWidthChanged: print("implicit width changed", implicitWidth)
48+ onImplicitHeightChanged: print("implicit height changed", implicitHeight)
49+
50+ Timer {
51+ interval: 1000
52+ repeat: true
53+ running: true
54+ onTriggered: print("implicit size:", root.implicitWidth, root.implicitHeight)
55+ }
56+
4557 InputWatcher {
4658 target: surfaceItem
4759 onTargetPressedChanged: {
@@ -101,33 +113,33 @@ FocusScope {
101113 enabled: surfaceItem.enabled
102114 }
103115
104− // MirSurface size drives SurfaceContainer size
105− Binding {
106− target: surfaceItem; property: "width"; value: root.surface ? root.surface.size.width : 0
107− when: root.requestedWidth >= 0 && root.surface
108− }
109− Binding {
110− target: surfaceItem; property: "height"; value: root.surface ? root.surface.size.height : 0
111− when: root.requestedHeight >= 0 && root.surface
112− }
113− Binding {
114− target: root; property: "implicitWidth"; value: surfaceItem.width
115− when: root.requestedWidth >= 0
116− }
117− Binding {
118− target: root; property: "implicitHeight"; value: surfaceItem.height
119− when: root.requestedHeight >= 0
120− }
121−
122− // SurfaceContainer size drives MirSurface size
123− Binding {
124− target: surfaceItem; property: "width"; value: root.width
125− when: root.requestedWidth < 0
126− }
127− Binding {
128− target: surfaceItem; property: "height"; value: root.height
129− when: root.requestedHeight < 0
130− }
116+// // MirSurface size drives SurfaceContainer size
117+// Binding {
118+// target: surfaceItem; property: "width"; value: root.surface ? root.surface.size.width : 0
119+// when: root.requestedWidth >= 0 && root.surface
120+// }
121+// Binding {
122+// target: surfaceItem; property: "height"; value: root.surface ? root.surface.size.height : 0
123+// when: root.requestedHeight >= 0 && root.surface
124+// }
125+// Binding {
126+// target: root; property: "implicitWidth"; value: surfaceItem.width
127+// when: root.requestedWidth >= 0
128+// }
129+// Binding {
130+// target: root; property: "implicitHeight"; value: surfaceItem.height
131+// when: root.requestedHeight >= 0
132+// }
133+
134+// // SurfaceContainer size drives MirSurface size
135+// Binding {
136+// target: surfaceItem; property: "width"; value: root.width
137+// when: root.requestedWidth < 0
138+// }
139+// Binding {
140+// target: surfaceItem; property: "height"; value: root.height
141+// when: root.requestedHeight < 0
142+// }
131143
132144 Loader {
133145 id: animationsLoader