on xenial help sign in
fix tiny windows when switching stages
commit73f71311fe4e3fb068c839fb873e285f996e874a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 25 Feb 2016, 14:18 (11 years ago) parent6182815
1 file changed+4−4
qml/Stages/WindowResizeArea.qml+4−4
qml/Stages/WindowResizeArea.qml+4−4
@@ -73,10 +73,10 @@ MouseArea {
7373 var windowGeometry = windowStateStorage.getGeometry(root.windowId,
7474 Qt.rect(target.x, target.y, defaultWidth, defaultHeight));
7575
76− target.requestedWidth = Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin);
77− target.requestedHeight = Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight);
78− target.x = Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin)
79− target.y = Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight)
76+ target.requestedWidth = Qt.binding(function() { return Math.min(Math.max(windowGeometry.width, d.minimumWidth), screenWidth - root.leftMargin); });
77+ target.requestedHeight = Qt.binding(function() { return Math.min(Math.max(windowGeometry.height, d.minimumHeight), root.screenHeight - PanelState.panelHeight); });
78+ target.x = Qt.binding(function() { return Math.max(Math.min(windowGeometry.x, root.screenWidth - root.leftMargin - target.requestedWidth), root.leftMargin); });
79+ target.y = Qt.binding(function() { return Math.max(Math.min(windowGeometry.y, root.screenHeight - target.requestedHeight), PanelState.panelHeight); });
8080
8181 var windowState = windowStateStorage.getState(root.windowId, WindowStateStorage.WindowStateNormal)
8282 if (windowState === WindowStateStorage.WindowStateMaximized) {