@@ -90,6 +90,8 @@ Item {
90 PropertyChanges {
90 PropertyChanges {
91 target: shell
91 target: shell
92 transformRotationAngle: 0
92 transformRotationAngle: 0
93+ transformOriginX: orientedShell.width / 2
94+ transformOriginY: orientedShell.width / 2
95 width: orientedShell.width
97 width: orientedShell.width
@@ -101,20 +103,23 @@ Item {
101 PropertyChanges {
103 PropertyChanges {
102 target: shell
104 target: shell
103 transformRotationAngle: 90
105 transformRotationAngle: 90
106+ transformOriginX: orientedShell.width / 2
107+ transformOriginY: orientedShell.width / 2
106 width: orientedShell.height
110 width: orientedShell.height
107 height: orientedShell.width
111 height: orientedShell.width
110− // FIXME: 180 and 270 need to be updated
112 name: "180"
115 name: "180"
113 PropertyChanges {
116 PropertyChanges {
114 target: shell
117 target: shell
115− rotation: 180
118+ transformRotationAngle: 180
116− x: orientedShell.width
119+ transformOriginX: orientedShell.width / 2
120+ transformOriginY: orientedShell.width / 2
117− y: orientedShell.height
122+ y: orientedShell.height - orientedShell.width
118 width: orientedShell.width
123 width: orientedShell.width
119 height: orientedShell.height
124 height: orientedShell.height
@@ -123,9 +128,11 @@ Item {
123 name: "270"
128 name: "270"
124 PropertyChanges {
129 PropertyChanges {
125 target: shell
130 target: shell
126− rotation: 270
131+ transformRotationAngle: -90
132+ transformOriginX: orientedShell.height / 2
133+ transformOriginY: orientedShell.height / 2
128− y: orientedShell.height
135+ y: 0
129 width: orientedShell.height
136 width: orientedShell.height
130 height: orientedShell.width
137 height: orientedShell.width
@@ -150,6 +157,11 @@ Item {
150 PropertyAction { target: shell; property: "width"; value: orientedShell.width }
157 PropertyAction { target: shell; property: "width"; value: orientedShell.width }
151 PropertyAction { target: shell; property: "height"; value: orientedShell.height }
158 PropertyAction { target: shell; property: "height"; value: orientedShell.height }
152 PropertyAction { target: shell; property: "transformRotationAngle"; value: 90 }
159 PropertyAction { target: shell; property: "transformRotationAngle"; value: 90 }
160+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.width / 2 }
161+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.width / 2 }
162+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.width / 2 }
163+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.width / 2 }
164+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
153 ParallelAnimation {
165 ParallelAnimation {
154 NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
166 NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
155 NumberAnimation { target: shell; property: "transformRotationAngle"; to: 0; duration: rotationDuration; easing.type: rotationEasing }
167 NumberAnimation { target: shell; property: "transformRotationAngle"; to: 0; duration: rotationDuration; easing.type: rotationEasing }
@@ -158,6 +170,7 @@ Item {
158 NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: -90; duration: rotationDuration; easing.type: rotationEasing }
170 NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: -90; duration: rotationDuration; easing.type: rotationEasing }
160 PropertyAction { target: windowScreenshot; property: "visible"; value: false }
172 PropertyAction { target: windowScreenshot; property: "visible"; value: false }
173+ ScriptAction { script: { windowScreenshot.discard(); } }
163 Transition {
176 Transition {
@@ -170,6 +183,11 @@ Item {
170 PropertyAction { target: shell; property: "width"; value: orientedShell.height }
183 PropertyAction { target: shell; property: "width"; value: orientedShell.height }
171 PropertyAction { target: shell; property: "height"; value: orientedShell.width }
184 PropertyAction { target: shell; property: "height"; value: orientedShell.width }
172 PropertyAction { target: shell; property: "transformRotationAngle"; value: 0 }
185 PropertyAction { target: shell; property: "transformRotationAngle"; value: 0 }
186+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.width / 2 }
187+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.width / 2 }
188+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.width / 2 }
189+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.width / 2 }
190+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
173 ParallelAnimation {
191 ParallelAnimation {
174 NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
192 NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
175 NumberAnimation { target: shell; property: "transformRotationAngle"; to: 90; duration: rotationDuration; easing.type: rotationEasing }
193 NumberAnimation { target: shell; property: "transformRotationAngle"; to: 90; duration: rotationDuration; easing.type: rotationEasing }
@@ -178,16 +196,181 @@ Item {
178 NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: 90; duration: rotationDuration; easing.type: rotationEasing }
196 NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: 90; duration: rotationDuration; easing.type: rotationEasing }
180 PropertyAction { target: windowScreenshot; property: "visible"; value: false }
198 PropertyAction { target: windowScreenshot; property: "visible"; value: false }
199+ ScriptAction { script: { windowScreenshot.discard(); } }
206+ SequentialAnimation {
207+ ScriptAction { script: { windowScreenshot.take(); } }
208+ PropertyAction { target: windowScreenshot; property: "visible"; value: true }
209+ PropertyAction { target: shell; property: "width"; value: orientedShell.height }
210+ PropertyAction { target: shell; property: "height"; value: orientedShell.width }
211+ PropertyAction { target: shell; property: "transformRotationAngle"; value: 0 }
212+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.height / 2 }
213+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.height / 2 }
214+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.height / 2 }
215+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.height / 2 }
216+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
218+ NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
219+ NumberAnimation { target: shell; property: "transformRotationAngle"; to: -90; duration: rotationDuration; easing.type: rotationEasing }
221+ NumberAnimation { target: windowScreenshot; property: "opacity"; from: 1; to: 0; duration: rotationDuration; easing.type: rotationEasing }
222+ NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: -90; duration: rotationDuration; easing.type: rotationEasing }
224+ PropertyAction { target: windowScreenshot; property: "visible"; value: false }
225+ ScriptAction { script: { windowScreenshot.discard(); } }
232+ SequentialAnimation {
233+ ScriptAction { script: { windowScreenshot.take(); } }
234+ PropertyAction { target: windowScreenshot; property: "visible"; value: true }
235+ PropertyAction { target: shell; property: "width"; value: orientedShell.width }
236+ PropertyAction { target: shell; property: "height"; value: orientedShell.height }
237+ PropertyAction { target: shell; property: "transformRotationAngle"; value: -90 }
238+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.height / 2 }
239+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.height / 2 }
240+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.height / 2 }
241+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.height / 2 }
242+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
244+ NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
245+ NumberAnimation { target: shell; property: "transformRotationAngle"; to: 0; duration: rotationDuration; easing.type: rotationEasing }
247+ NumberAnimation { target: windowScreenshot; property: "opacity"; from: 1; to: 0; duration: rotationDuration; easing.type: rotationEasing }
248+ NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: 90; duration: rotationDuration; easing.type: rotationEasing }
250+ PropertyAction { target: windowScreenshot; property: "visible"; value: false }
251+ ScriptAction { script: { windowScreenshot.discard(); } }
258+ SequentialAnimation {
259+ ScriptAction { script: { windowScreenshot.take(); } }
260+ PropertyAction { target: windowScreenshot; property: "visible"; value: true }
261+ PropertyAction { target: shell; property: "width"; value: orientedShell.width }
262+ PropertyAction { target: shell; property: "height"; value: orientedShell.height }
263+ PropertyAction { target: shell; property: "transformRotationAngle"; value: 90 }
264+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.width / 2 }
265+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.width / 2 }
266+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.width / 2 }
267+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.width / 2 }
268+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
270+ NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
271+ NumberAnimation { target: shell; property: "transformRotationAngle"; to: 180; duration: rotationDuration; easing.type: rotationEasing }
272+ NumberAnimation { target: shell; property: "y"; from: 0; to: orientedShell.height - orientedShell.width; duration: rotationDuration; easing.type: rotationEasing }
274+ NumberAnimation { target: windowScreenshot; property: "opacity"; from: 1; to: 0; duration: rotationDuration; easing.type: rotationEasing }
275+ NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: 90; duration: rotationDuration; easing.type: rotationEasing }
276+ NumberAnimation { target: windowScreenshot; property: "y"; from: 0; to: orientedShell.height - orientedShell.width; duration: rotationDuration; easing.type: rotationEasing }
278+ PropertyAction { target: windowScreenshot; property: "visible"; value: false }
279+ ScriptAction { script: { windowScreenshot.discard(); } }
286+ SequentialAnimation {
287+ ScriptAction { script: { windowScreenshot.take(); } }
288+ PropertyAction { target: windowScreenshot; property: "visible"; value: true }
289+ PropertyAction { target: shell; property: "width"; value: orientedShell.height }
290+ PropertyAction { target: shell; property: "height"; value: orientedShell.width }
291+ PropertyAction { target: shell; property: "transformRotationAngle"; value: 180 }
292+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.width / 2 }
293+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.width / 2 }
294+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.width / 2 }
295+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.height - (orientedShell.width / 2) }
296+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
298+ NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
299+ NumberAnimation { target: shell; property: "transformRotationAngle"; to: 90; duration: rotationDuration; easing.type: rotationEasing }
300+ NumberAnimation { target: shell; property: "y"; from: orientedShell.height - orientedShell.width; to: 0; duration: rotationDuration; easing.type: rotationEasing }
302+ NumberAnimation { target: windowScreenshot; property: "opacity"; from: 1; to: 0; duration: rotationDuration; easing.type: rotationEasing }
303+ NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: -90; duration: rotationDuration; easing.type: rotationEasing }
304+ NumberAnimation { target: windowScreenshot; property: "y"; from: 0; to: -orientedShell.height + orientedShell.width; duration: rotationDuration; easing.type: rotationEasing }
306+ PropertyAction { target: windowScreenshot; property: "visible"; value: false }
307+ ScriptAction { script: { windowScreenshot.discard(); } }
314+ SequentialAnimation {
315+ ScriptAction { script: { windowScreenshot.take(); } }
316+ PropertyAction { target: windowScreenshot; property: "visible"; value: true }
317+ PropertyAction { target: shell; property: "width"; value: orientedShell.height }
318+ PropertyAction { target: shell; property: "height"; value: orientedShell.width }
319+ PropertyAction { target: shell; property: "y"; value: orientedShell.height - orientedShell.width }
320+ PropertyAction { target: shell; property: "transformRotationAngle"; value: 180 }
321+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.width / 2 }
322+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.width / 2 }
323+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.width / 2 }
324+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.height - (orientedShell.width / 2) }
325+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
327+ NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
328+ NumberAnimation { target: shell; property: "transformRotationAngle"; to: 270; duration: rotationDuration; easing.type: rotationEasing }
330+ NumberAnimation { target: windowScreenshot; property: "opacity"; from: 1; to: 0; duration: rotationDuration; easing.type: rotationEasing }
331+ NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: 90; duration: rotationDuration; easing.type: rotationEasing }
333+ PropertyAction { target: windowScreenshot; property: "visible"; value: false }
334+ ScriptAction { script: { windowScreenshot.discard(); } }
341+ SequentialAnimation {
342+ ScriptAction { script: { windowScreenshot.take(); } }
343+ PropertyAction { target: windowScreenshot; property: "visible"; value: true }
344+ PropertyAction { target: shell; property: "width"; value: orientedShell.width }
345+ PropertyAction { target: shell; property: "height"; value: orientedShell.height }
346+ PropertyAction { target: shell; property: "y"; value: orientedShell.height - orientedShell.width }
347+ PropertyAction { target: shell; property: "transformRotationAngle"; value: 270 }
348+ PropertyAction { target: shell; property: "transformOriginX"; value: orientedShell.width / 2 }
349+ PropertyAction { target: shell; property: "transformOriginY"; value: orientedShell.width / 2 }
350+ PropertyAction { target: windowScreenshot; property: "transformOriginX"; value: orientedShell.width / 2 }
351+ PropertyAction { target: windowScreenshot; property: "transformOriginY"; value: orientedShell.height - (orientedShell.width / 2) }
352+ PropertyAction { target: windowScreenshot; property: "y"; value: 0 }
354+ NumberAnimation { target: shell; property: "opacity"; from: 0; to: 1; duration: rotationDuration; easing.type: rotationEasing }
355+ NumberAnimation { target: shell; property: "transformRotationAngle"; to: 180; duration: rotationDuration; easing.type: rotationEasing }
357+ NumberAnimation { target: windowScreenshot; property: "opacity"; from: 1; to: 0; duration: rotationDuration; easing.type: rotationEasing }
358+ NumberAnimation { target: windowScreenshot; property: "transformRotationAngle"; from: 0; to: -90; duration: rotationDuration; easing.type: rotationEasing }
360+ PropertyAction { target: windowScreenshot; property: "visible"; value: false }
361+ ScriptAction { script: { windowScreenshot.discard(); } }
186 id: shell
367 id: shell
187− property real transformRotationAngle: 0
368+ property real transformRotationAngle
369+ property real transformOriginX
370+ property real transformOriginY
189 transform: Rotation {
372 transform: Rotation {
190− origin.x: orientedShell.width / 2; origin.y: orientedShell.width / 2; axis { x: 0; y: 0; z: 1 }
373+ origin.x: shell.transformOriginX; origin.y: shell.transformOriginY; axis { x: 0; y: 0; z: 1 }
191 angle: shell.transformRotationAngle
374 angle: shell.transformRotationAngle
@@ -195,11 +378,15 @@ Item {
195 WindowScreenshot {
378 WindowScreenshot {
196 id: windowScreenshot
379 id: windowScreenshot
197 visible: false
380 visible: false
381+ width: orientedShell.width
382+ height: orientedShell.height
199− property real transformRotationAngle: 0
384+ property real transformRotationAngle
385+ property real transformOriginX
386+ property real transformOriginY
201 transform: Rotation {
388 transform: Rotation {
202− origin.x: orientedShell.width / 2; origin.y: orientedShell.width / 2; axis { x: 0; y: 0; z: 1 }
389+ origin.x: windowScreenshot.transformOriginX; origin.y: windowScreenshot.transformOriginY; axis { x: 0; y: 0; z: 1 }
203 angle: windowScreenshot.transformRotationAngle
390 angle: windowScreenshot.transformRotationAngle