@@ -0,0 +1,75 @@
1+import QtQuick 2.4
2+import Ubuntu.Components 1.3
3+import Unity.Screens 0.1
4+import Unity.Application 0.1
5+import ".."
6+
7+Item {
8+ id: root
9+
10+
11+ Rectangle { anchors.fill: parent; color: "blue"; opacity: .3 }
12+
13+ Row {
14+ anchors.centerIn: parent
15+ spacing: units.gu(1)
16+
17+ Repeater {
18+ model: Screens
19+
20+ delegate: Rectangle {
21+ id: previewSpace
22+ height: root.height * .5
23+ width: height * 1.4
24+ color: "red"
25+
26+ property int screenWidth: model.geometry.width
27+ property int screenHeight: model.geometry.height
28+
29+ Label {
30+ text: model.name + "," + model.geometry.width
31+ }
32+
33+ Rectangle {
34+ anchors.fill: parent
35+ anchors.topMargin: units.gu(4)
36+
37+ Repeater {
38+ id: topLevelSurfaceRepeater
39+ model: topLevelSurfaceList
40+ delegate: Rectangle {
41+ width: surfaceItem.width
42+ height: surfaceItem.height
43+ x: model.window.position.x * surfaceItem.previewScale
44+ y: model.window.position.y * surfaceItem.previewScale
45+ color: "blue"
46+ z: topLevelSurfaceRepeater.count - index
47+
48+
49+ MirSurfaceItem {
50+ id: surfaceItem
51+
52+ property real previewScale: previewSpace.width / previewSpace.screenWidth
53+
54+ width: implicitWidth * previewScale
55+ height: implicitHeight * previewScale
56+// fillMode: MirSurfaceItem.Stretch
57+ surfaceWidth: -1
58+ surfaceHeight: -1
59+ onImplicitHeightChanged: print("item", surfaceItem, "height changed", implicitHeight)
60+ // surfaceWidth: 100
61+ // surfaceHeight: 100
62+ // requestedHeight: 100// -1// !counterRotate ? root.requestedHeight - d.requestedDecorationHeight : root.requestedWidth
63+ // requestedWidth: 100// -1// !counterRotate ? root.requestedWidth : root.requestedHeight - d.requestedDecorationHeight
64+
65+ // application: model.application
66+ surface: model.window.surface
67+ }
68+ }
69+ }
70+ }
71+
72+ }
73+ }
74+ }
75+}