@@ -10,8 +10,9 @@ Item {
1010 Connections {
1111 target: ApplicationManager
1212 onApplicationAdded: {
13+ // Initial placement to avoid having the window decoration behind the panel
14+ appRepeater.itemAt(ApplicationManager.count-1).y = units.gu(3)
1315 ApplicationManager.requestFocusApplication(ApplicationManager.get(ApplicationManager.count-1).appId)
14−// ApplicationManager.move(ApplicationManager.count - 1, 0)
1516 }
1617
1718 onFocusRequested: {
@@ -32,8 +33,6 @@ Item {
3233 }
3334 return -1;
3435 }
35−
36−
3736 }
3837
3938 Repeater {
@@ -42,8 +41,6 @@ Item {
4241
4342 delegate: Item {
4443 id: appDelegate
45− x: units.gu(5)
46− y: units.gu(5)
4744 height: units.gu(30)
4845 width: units.gu(30)
4946 z: ApplicationManager.count - index
@@ -58,12 +55,12 @@ Item {
5855 },
5956 State {
6057 name: "minimized"
61− PropertyChanges { target: appDelegate; x: 0; width: units.gu(5); height: units.gu(5); opacity: 0 }
58+ PropertyChanges { target: appDelegate; x: -appDelegate.width / 2; scale: units.gu(5) / appDelegate.width; opacity: 0 }
6259 }
6360 ]
6461 transitions: [
6562 Transition {
66− PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height" }
63+ PropertyAnimation { target: appDelegate; properties: "x,y,opacity,width,height,scale" }
6764 }
6865 ]
6966
@@ -129,7 +126,7 @@ Item {
129126 height: units.gu(3)
130127 title: model.name
131128 onClose: ApplicationManager.stopApplication(model.appId)
132− onMaximize: appDelegate.state = "maximized"
129+ onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
133130 onMinimize: appDelegate.state = "minimized"
134131 }
135132