@@ -127,6 +127,7 @@ AbstractStage {
127127 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
128128
129129 property bool goneToSpread: false
130+ property int animationDuration: UbuntuAnimation.SleepyDuration
130131
131132 function updateForegroundMaximizedApp() {
132133 var found = false;
@@ -324,8 +325,6 @@ AbstractStage {
324325
325326 readonly property var surface: model.surface
326327
327− property real angle: 0
328−
329328 function claimFocus() {
330329// if (spread.state == "altTab") {
331330// spread.cancel();
@@ -493,40 +492,26 @@ AbstractStage {
493492 targetAngle: spreadMaths.animatedAngle
494493 }
495494
496− transform: [
497− Scale {
498− origin.x: itemScaleOriginX
499− origin.y: itemScaleOriginY
500− xScale: itemScale
501− yScale: itemScale
502− },
503− Rotation {
504−// origin { x: 0; y: (clippedSpreadDelegate.height - (clippedSpreadDelegate.height * itemScale / 2)) }
505− axis { x: 0; y: 1; z: 0 }
506− angle: appDelegate.angle
507− }
508− ]
509−
510495// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
511496 onRequestedWidthChanged: if (index == 0) print("requestedWidth", requestedWidth)
512497 states: [
513498 State {
514499 name: "spread"; when: root.state == "spread"
515− PropertyChanges { target: appDelegate;
500+ PropertyChanges {
501+ target: appDelegate;
516502 x: spreadMaths.animatedX
517503 y: spreadMaths.animatedY
518504 z: index
519− angle: spreadMaths.animatedAngle
520− height: appDelegate.width
505+ height: appContainer.height
521506 }
522507 PropertyChanges {
523508 target: decoratedWindow;
524509 showDecoration: false;
525510 height: units.gu(15)
526511 width: units.gu(15)
512+ angle: spreadMaths.animatedAngle
527513 requestedWidth: decoratedWindow.oldRequestedWidth
528514 requestedHeight: decoratedWindow.oldRequestedHeight
529−// resizeSurface: false;
530515 }
531516 PropertyChanges { target: inputBlocker; enabled: true }
532517 },
@@ -540,7 +525,6 @@ AbstractStage {
540525 target: appDelegate
541526 y: PanelState.panelHeight
542527 x: stagedRightEdgeMaths.animatedX
543− angle: stagedRightEdgeMaths.animatedAngle
544528 z: index
545529 }
546530 PropertyChanges {
@@ -550,6 +534,7 @@ AbstractStage {
550534 requestedHeight: stagedRightEdgeMaths.animatedHeight
551535 width: appContainer.width - root.leftMargin
552536 height: appContainer.height
537+ angle: stagedRightEdgeMaths.animatedAngle
553538 }
554539 },
555540 State {
@@ -693,19 +678,17 @@ AbstractStage {
693678 },
694679 Transition {
695680 to: "spread"
696− PropertyAnimation { target: appDelegate; properties: "x,y,width,height"; duration: UbuntuAnimation.FastDuration }
681+ PropertyAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
682+ PropertyAnimation { target: decoratedWindow; properties: "width,height,angle"; duration: priv.animationDuration }
697683 },
698684 Transition {
699685 from: "spread"; to: "staged"
700− PropertyAnimation {
701− target: appDelegate
702− properties: "x,y,angle"
703− duration: 4000
704− }
686+ PropertyAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
687+ PropertyAnimation { target: decoratedWindow; properties: "angle,width,height"; duration: priv.animationDuration }
705688 },
706689 Transition { // Ordering is important. This generic case needs to be after spread -> staged
707690 to: "staged";
708− PropertyAnimation { target: appDelegate; properties: "x,y,width,height"; duration: UbuntuAnimation.FastDuration }
691+ PropertyAnimation { target: appDelegate; properties: "x,y,width,height"; duration: priv.animationDuration }
709692 }
710693 ]
711694
@@ -781,6 +764,21 @@ AbstractStage {
781764 print("***** focusing because of decoration press", model.application.appId)
782765 appDelegate.focus = true;
783766 }
767+
768+ property real angle: 0
769+ transform: [
770+// Scale {
771+// origin.x: itemScaleOriginX
772+// origin.y: itemScaleOriginY
773+// xScale: itemScale
774+// yScale: itemScale
775+// },
776+ Rotation {
777+ // origin { x: 0; y: (clippedSpreadDelegate.height - (clippedSpreadDelegate.height * itemScale / 2)) }
778+ axis { x: 0; y: 1; z: 0 }
779+ angle: decoratedWindow.angle
780+ }
781+ ]
784782 }
785783
786784 WindowedFullscreenPolicy {