@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2015-2016 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -30,8 +30,7 @@ SequentialAnimation {
31 ScriptAction { script: {
31 ScriptAction { script: {
32 info.transitioning = true;
32 info.transitioning = true;
33− windowScreenshot.take();
33+
34− windowScreenshot.visible = true;
35 shell.orientationAngle = root.toAngle;
34 shell.orientationAngle = root.toAngle;
36 shell.x = 0;
35 shell.x = 0;
37 shell.width = flipShellDimensions ? orientedShell.height : orientedShell.width;
36 shell.width = flipShellDimensions ? orientedShell.height : orientedShell.width;
@@ -41,12 +40,10 @@ SequentialAnimation {
41 shell.updateFocusedAppOrientation();
40 shell.updateFocusedAppOrientation();
42 shellCover.visible = true;
41 shellCover.visible = true;
44− windowScreenshot.transformOriginX = orientedShell.width / 2;
43+ shellSnapshot.transformOriginX = shell.transformOriginX;
45− if (fromAngle == 180 || fromAngle == 270) {
44+ shellSnapshot.transformOriginY = shell.transformOriginY;
46− windowScreenshot.transformOriginY = orientedShell.height - (orientedShell.width / 2);
45+ shellSnapshot.transformRotationAngle = shell.transformRotationAngle;
47− } else {
46+ shellSnapshot.visible = true;
48− windowScreenshot.transformOriginY = orientedShell.width / 2;
51 ParallelAnimation {
48 ParallelAnimation {
52 NumberAnimation {
49 NumberAnimation {
@@ -66,24 +63,24 @@ SequentialAnimation {
68 NumberAnimation {
65 NumberAnimation {
69− target: windowScreenshot; property: "opacity"; from: 1; to: 0;
66+ target: shellSnapshot; property: "opacity"; from: 1; to: 0;
70 duration: rotationDuration; easing.type: rotationEasing
67 duration: rotationDuration; easing.type: rotationEasing
72 RotationAnimation {
69 RotationAnimation {
73− target: windowScreenshot; property: "transformRotationAngle";
70+ target: shellSnapshot; property: "transformRotationAngle";
74− from: 0; to: root.toAngle - root.fromAngle
71+ from: root.fromAngle; to: root.toAngle
75 direction: RotationAnimation.Shortest
72 direction: RotationAnimation.Shortest
76 duration: rotationDuration; easing.type: rotationEasing
73 duration: rotationDuration; easing.type: rotationEasing
78 NumberAnimation {
75 NumberAnimation {
79− target: windowScreenshot; property: "y"
76+ target: shellSnapshot; property: "y"
80− from: 0; to: root.toY - root.fromY
77+ from: root.fromY; to: root.toY
81 duration: rotationDuration; easing.type: rotationEasing
78 duration: rotationDuration; easing.type: rotationEasing
84 ScriptAction { script: {
81 ScriptAction { script: {
85− windowScreenshot.visible = false;
82+ shellSnapshot.visible = false;
86− windowScreenshot.discard();
83+ shellSnapshot.discard();
87 shellCover.visible = false;
84 shellCover.visible = false;
88 info.transitioning = false;
85 info.transitioning = false;