@@ -1412,11 +1412,12 @@ FocusScope {
14121412 name: "minimized"; when: appDelegate.minimized
14131413 PropertyChanges {
14141414 target: appDelegate
1415− requestedX: -appDelegate.width / 2
14161415 scale: units.gu(5) / appDelegate.width
14171416 opacity: 0;
14181417 visuallyMinimized: true
14191418 visuallyMaximized: false
1419+ x: -appDelegate.width / 2
1420+ y: root.height / 2
14201421 }
14211422 }
14221423 ]
@@ -1432,15 +1433,6 @@ FocusScope {
14321433 to: "staged,stagedWithSideStage"
14331434 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,requestedX,requestedY,requestedWidth,requestedHeight"; duration: priv.animationDuration}
14341435 },
1435− Transition {
1436− to: "minimized"
1437− enabled: appDelegate.animationsEnabled
1438− PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1439− SequentialAnimation {
1440− UbuntuNumberAnimation { target: appDelegate; properties: "requestedX,requestedY,opacity,scale,requestedWidth,requestedHeight" }
1441− PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1442− }
1443− },
14441436 Transition {
14451437 to: "spread"
14461438 // DecoratedWindow wants the scaleToPreviewSize set before enabling scaleToPreview
@@ -1489,6 +1481,31 @@ FocusScope {
14891481 PropertyAction { target: appDelegate; property: "visible" }
14901482 }
14911483 },
1484+ Transition {
1485+ from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1486+ to: "minimized"
1487+ SequentialAnimation {
1488+ ScriptAction { script: print("transitioning:", appDelegate.x, appDelegate.y, appDelegate.scale) }
1489+ ScriptAction { script: { fakeRectangle.stop(); } }
1490+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1491+ UbuntuNumberAnimation { target: appDelegate; properties: "x,y,scale,opacity"; duration: priv.animationDuration }
1492+ PropertyAction { target: appDelegate; property: "visuallyMinimized" }
1493+ }
1494+ },
1495+ Transition {
1496+ from: "minimized"
1497+ to: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen"
1498+ SequentialAnimation {
1499+ ScriptAction { script: print("transitioning:", appDelegate.x, appDelegate.y, appDelegate.scale) }
1500+ PropertyAction { target: appDelegate; property: "visuallyMinimized,z" }
1501+ ParallelAnimation {
1502+ UbuntuNumberAnimation { target: appDelegate; properties: "x"; from: -appDelegate.width / 2; duration: priv.animationDuration }
1503+ UbuntuNumberAnimation { target: appDelegate; properties: "y,opacity"; duration: priv.animationDuration }
1504+ UbuntuNumberAnimation { target: appDelegate; properties: "scale"; from: 0; duration: priv.animationDuration }
1505+ }
1506+ PropertyAction { target: appDelegate; property: "visuallyMaximized" }
1507+ }
1508+ },
14921509 Transition {
14931510 id: windowedTransition
14941511 from: ",normal,restored,maximized,maximizedLeft,maximizedRight,maximizedTopLeft,maximizedTopRight,maximizedBottomLeft,maximizedBottomRight,maximizedHorizontally,maximizedVertically,fullscreen,minimized"