@@ -46,6 +46,7 @@ FocusScope {
46 property int leftMargin: 0
46 property int leftMargin: 0
47 property bool oskEnabled: false
47 property bool oskEnabled: false
48 property rect inputMethodRect
48 property rect inputMethodRect
49+ property PanelState panelState
50 // Configuration
51 // Configuration
51 property string mode: "staged"
52 property string mode: "staged"
@@ -348,20 +349,20 @@ FocusScope {
348 Component.onCompleted: priv.updateMainAndSideStageIndexes();
349 Component.onCompleted: priv.updateMainAndSideStageIndexes();
350 Connections {
351 Connections {
351− target: PanelState
352+ target: panelState
352 onCloseClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.close(); } }
353 onCloseClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.close(); } }
353 onMinimizeClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.requestMinimize(); } }
354 onMinimizeClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.requestMinimize(); } }
354 onRestoreClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.requestRestore(); } }
355 onRestoreClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.requestRestore(); } }
357 Binding {
358 Binding {
358− target: PanelState
359+ target: panelState
359 property: "buttonsVisible"
360 property: "buttonsVisible"
360 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized // FIXME for Locally integrated menus
361 value: priv.focusedAppDelegate !== null && priv.focusedAppDelegate.maximized // FIXME for Locally integrated menus
363 Binding {
364 Binding {
364− target: PanelState
365+ target: panelState
365 property: "title"
366 property: "title"
367 if (priv.focusedAppDelegate !== null) {
368 if (priv.focusedAppDelegate !== null) {
@@ -376,21 +377,21 @@ FocusScope {
378 Binding {
379 Binding {
379− target: PanelState
380+ target: panelState
380 property: "dropShadow"
381 property: "dropShadow"
381 value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null && mode == "windowed"
382 value: priv.focusedAppDelegate && !priv.focusedAppDelegate.maximized && priv.foregroundMaximizedAppDelegate !== null && mode == "windowed"
384 Binding {
385 Binding {
385− target: PanelState
386+ target: panelState
386 property: "closeButtonShown"
387 property: "closeButtonShown"
387 value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized && !priv.focusedAppDelegate.isDash
388 value: priv.focusedAppDelegate && priv.focusedAppDelegate.maximized && !priv.focusedAppDelegate.isDash
390 Component.onDestruction: {
391 Component.onDestruction: {
391− PanelState.title = "";
392+ panelState.title = "";
392− PanelState.buttonsVisible = false;
393+ panelState.buttonsVisible = false;
393− PanelState.dropShadow = false;
394+ panelState.dropShadow = false;
396 Instantiator {
397 Instantiator {
@@ -739,7 +740,7 @@ FocusScope {
739 target: appDelegate
740 target: appDelegate
740 property: "y"
741 property: "y"
741 value: appDelegate.requestedY -
742 value: appDelegate.requestedY -
742− Math.min(appDelegate.requestedY - PanelState.panelHeight,
743+ Math.min(appDelegate.requestedY - panelState.panelHeight,
743 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
744 Math.max(0, priv.virtualKeyboardHeight - (appContainer.height - (appDelegate.requestedY + appDelegate.height))))
744 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
745 when: root.oskEnabled && appDelegate.focus && (appDelegate.state == "normal" || appDelegate.state == "restored")
745 && root.inputMethodRect.height > 0
746 && root.inputMethodRect.height > 0
@@ -876,7 +877,7 @@ FocusScope {
876 screenWidth: appContainer.width
877 screenWidth: appContainer.width
877 screenHeight: appContainer.height
878 screenHeight: appContainer.height
878 leftMargin: root.leftMargin
879 leftMargin: root.leftMargin
879− minimumY: PanelState.panelHeight
880+ minimumY: panelState.panelHeight
882 Connections {
883 Connections {
@@ -1116,7 +1117,7 @@ FocusScope {
1116 progress: 0
1117 progress: 0
1117 targetHeight: spreadItem.stackHeight
1118 targetHeight: spreadItem.stackHeight
1118 targetX: spreadMaths.targetX
1119 targetX: spreadMaths.targetX
1119− startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
1120+ startY: appDelegate.fullscreen ? 0 : panelState.panelHeight
1120 targetY: spreadMaths.targetY
1121 targetY: spreadMaths.targetY
1121 targetAngle: spreadMaths.targetAngle
1122 targetAngle: spreadMaths.targetAngle
1122 targetScale: spreadMaths.targetScale
1123 targetScale: spreadMaths.targetScale
@@ -1235,9 +1236,9 @@ FocusScope {
1235 PropertyChanges {
1236 PropertyChanges {
1236 target: appDelegate
1237 target: appDelegate
1237 x: stageMaths.itemX
1238 x: stageMaths.itemX
1238− y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
1239+ y: appDelegate.fullscreen ? 0 : panelState.panelHeight
1239 requestedWidth: appContainer.width
1240 requestedWidth: appContainer.width
1240− requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
1241+ requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - panelState.panelHeight
1241 visuallyMaximized: true
1242 visuallyMaximized: true
1242 visible: appDelegate.x < root.width
1243 visible: appDelegate.x < root.width
@@ -1263,10 +1264,10 @@ FocusScope {
1263 PropertyChanges {
1264 PropertyChanges {
1264 target: appDelegate
1265 target: appDelegate
1265 x: stageMaths.itemX
1266 x: stageMaths.itemX
1266− y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
1267+ y: appDelegate.fullscreen ? 0 : panelState.panelHeight
1267 z: stageMaths.itemZ
1268 z: stageMaths.itemZ
1268 requestedWidth: stageMaths.itemWidth
1269 requestedWidth: stageMaths.itemWidth
1269− requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
1270+ requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - panelState.panelHeight
1270 visuallyMaximized: true
1271 visuallyMaximized: true
1271 visible: appDelegate.x < root.width
1272 visible: appDelegate.x < root.width
@@ -1331,9 +1332,9 @@ FocusScope {
1331 PropertyChanges {
1332 PropertyChanges {
1332 target: appDelegate
1333 target: appDelegate
1333 windowedX: root.leftMargin
1334 windowedX: root.leftMargin
1334− windowedY: PanelState.panelHeight
1335+ windowedY: panelState.panelHeight
1335 windowedWidth: (appContainer.width - root.leftMargin)/2
1336 windowedWidth: (appContainer.width - root.leftMargin)/2
1336− windowedHeight: appContainer.height - PanelState.panelHeight
1337+ windowedHeight: appContainer.height - panelState.panelHeight
@@ -1350,9 +1351,9 @@ FocusScope {
1350 PropertyChanges {
1351 PropertyChanges {
1351 target: appDelegate
1352 target: appDelegate
1352 windowedX: root.leftMargin
1353 windowedX: root.leftMargin
1353− windowedY: PanelState.panelHeight
1354+ windowedY: panelState.panelHeight
1354 windowedWidth: (appContainer.width - root.leftMargin)/2
1355 windowedWidth: (appContainer.width - root.leftMargin)/2
1355− windowedHeight: (appContainer.height - PanelState.panelHeight)/2
1356+ windowedHeight: (appContainer.height - panelState.panelHeight)/2
@@ -1369,7 +1370,7 @@ FocusScope {
1369 PropertyChanges {
1370 PropertyChanges {
1370 target: appDelegate
1371 target: appDelegate
1371 windowedX: root.leftMargin
1372 windowedX: root.leftMargin
1372− windowedY: (appContainer.height + PanelState.panelHeight)/2
1373+ windowedY: (appContainer.height + panelState.panelHeight)/2
1373 windowedWidth: (appContainer.width - root.leftMargin)/2
1374 windowedWidth: (appContainer.width - root.leftMargin)/2
1374 windowedHeight: appContainer.height/2
1375 windowedHeight: appContainer.height/2
@@ -1391,8 +1392,8 @@ FocusScope {
1392 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
1393 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
1393 extend: "normal"
1394 extend: "normal"
1394− PropertyChanges { target: appDelegate; windowedX: windowedX; windowedY: PanelState.panelHeight;
1395+ PropertyChanges { target: appDelegate; windowedX: windowedX; windowedY: panelState.panelHeight;
1395− windowedWidth: windowedWidth; windowedHeight: appContainer.height - PanelState.panelHeight }
1396+ windowedWidth: windowedWidth; windowedHeight: appContainer.height - panelState.panelHeight }
1398 name: "minimized"; when: appDelegate.minimized
1399 name: "minimized"; when: appDelegate.minimized
@@ -1491,7 +1492,7 @@ FocusScope {
1493 Binding {
1494 Binding {
1494− target: PanelState
1495+ target: panelState
1495 property: "buttonsAlwaysVisible"
1496 property: "buttonsAlwaysVisible"
1496 value: appDelegate && appDelegate.maximized && touchControls.overlayShown
1497 value: appDelegate && appDelegate.maximized && touchControls.overlayShown
@@ -1506,7 +1507,7 @@ FocusScope {
1506 anchors.margins: touchControls.overlayShown ? borderThickness/2 : -borderThickness
1507 anchors.margins: touchControls.overlayShown ? borderThickness/2 : -borderThickness
1508 target: appDelegate
1509 target: appDelegate
1509− minimumY: PanelState.panelHeight // disallow resizing up past Panel
1510+ minimumY: panelState.panelHeight // disallow resizing up past Panel
1510 minWidth: units.gu(10)
1511 minWidth: units.gu(10)
1511 minHeight: units.gu(10)
1512 minHeight: units.gu(10)
1512 borderThickness: units.gu(2)
1513 borderThickness: units.gu(2)
@@ -1699,6 +1700,7 @@ FocusScope {
1699 leftMargin: root.leftMargin
1700 leftMargin: root.leftMargin
1700 appContainerWidth: appContainer.width
1701 appContainerWidth: appContainer.width
1701 appContainerHeight: appContainer.height
1702 appContainerHeight: appContainer.height
1703+ panelState: root.panelState
1704 EdgeBarrier {
1706 EdgeBarrier {