@@ -11,64 +11,16 @@ Item {
1111 Rectangle { anchors.fill: parent; color: "blue"; opacity: .3 }
1212
1313 Row {
14− anchors.centerIn: parent
14+ anchors.bottom: parent.bottom
15+ anchors.bottomMargin: units.gu(1)
16+ anchors.horizontalCenter: parent.horizontalCenter
1517 spacing: units.gu(1)
1618
1719 Repeater {
1820 model: Screens
1921
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−
22+ delegate: WorkspacePreview {
23+ height: root.height - units.gu(6)
7224 }
7325 }
7426 }