From a0f841e8eb2e3fc41a5d053232ea29cf538e30be Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 23 Mar 2017 13:45:55 +0100 Subject: [PATCH] Prevent MachineSettings dialog go beyond the top of screen --- resources/qml/Preferences/MachinesPage.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index 239e1a2aad..1abd688b32 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -114,6 +114,11 @@ UM.ManagementPage property var content minimumWidth: 350 * Screen.devicePixelRatio; minimumHeight: 350 * Screen.devicePixelRatio; + + // prevent the Machine Settings dialog from going beyond the top of the screen + x: (x < 0) ? 0 : x + y: (y < 0) ? 0 : y + onContentChanged: { contents = content;