@@ -26,8 +26,6 @@ FocusScope {
26 // (minus the window decoration size in case hasDecoration and showDecoration are true)
26 // (minus the window decoration size in case hasDecoration and showDecoration are true)
27 // The surface might not be able to resize to the requested values. It will return its actual size
27 // The surface might not be able to resize to the requested values. It will return its actual size
28 // in implicitWidth/implicitHeight.
28 // in implicitWidth/implicitHeight.
29− implicitWidth: applicationWindow.implicitWidth
30− implicitHeight: decorationHeight + applicationWindow.implicitHeight
32 property alias application: applicationWindow.application
30 property alias application: applicationWindow.application
33 property alias surface: applicationWindow.surface
31 property alias surface: applicationWindow.surface
@@ -81,6 +79,35 @@ FocusScope {
81 Behavior on visibleDecorationHeight { enabled: root.animateDecoration; UbuntuNumberAnimation { duration: priv.animationDuration } }
79 Behavior on visibleDecorationHeight { enabled: root.animateDecoration; UbuntuNumberAnimation { duration: priv.animationDuration } }
85+ name: "normal"; when: root.scaleToPreviewProgress == 0
88+ implicitWidth: applicationWindow.implicitWidth
89+ implicitHeight: root.decorationHeight + applicationWindow.implicitHeight
93+ name: "preview"; when: root.scaleToPreviewProgress > 0
96+ implicitWidth: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, root.scaleToPreviewSize, root.scaleToPreviewProgress)
97+ implicitHeight: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, root.scaleToPreviewSize, root.scaleToPreviewProgress)
100+ target: applicationWindow;
101+ requestedWidth: applicationWindow.oldRequestedWidth
102+ requestedHeight: applicationWindow.oldRequestedHeight
103+ width: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, applicationWindow.minSize, root.scaleToPreviewProgress)
104+ height: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, applicationWindow.minSize, root.scaleToPreviewProgress)
105+ itemScale: root.implicitWidth / width
84 Rectangle {
111 Rectangle {
85 id: selectionHighlight
112 id: selectionHighlight
86 anchors.fill: parent
113 anchors.fill: parent
@@ -138,21 +165,6 @@ FocusScope {
139 property real itemScale: 1
166 property real itemScale: 1
140 property real minSize: Math.min(root.scaleToPreviewSize, Math.min(applicationWindow.requestedHeight, applicationWindow.requestedWidth))
167 property real minSize: Math.min(root.scaleToPreviewSize, Math.min(applicationWindow.requestedHeight, applicationWindow.requestedWidth))
143− name: "preview"; when: root.scaleToPreviewProgress > 0
145− target: applicationWindow;
146− requestedWidth: applicationWindow.oldRequestedWidth
147− requestedHeight: applicationWindow.oldRequestedHeight
148− implicitWidth: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, root.scaleToPreviewSize, root.scaleToPreviewProgress)
149− implicitHeight: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, root.scaleToPreviewSize, root.scaleToPreviewProgress)
150− width: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedWidth, applicationWindow.minSize, root.scaleToPreviewProgress)
151− height: MathUtils.linearAnimation(0, 1, applicationWindow.oldRequestedHeight, applicationWindow.minSize, root.scaleToPreviewProgress)
152− itemScale: implicitWidth / width
157 transform: [
169 transform: [
158 Rotation {
170 Rotation {