From aad4fd876997d3c76d72093e3b80ae2e70989e36 Mon Sep 17 00:00:00 2001 From: daid Date: Tue, 24 Jul 2012 10:26:34 +0200 Subject: [PATCH] Reduce the 3D preview window size if the main window will not fit on the screen. #177 --- Cura/gui/mainWindow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 49df64fa..c1d4610e 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -246,6 +246,10 @@ class mainWindow(configBase.configWindowBase): self.updateProfileToControls() self.Fit() + if wx.Display().GetClientArea().GetWidth() < self.GetSize().GetWidth(): + f = self.GetSize().GetWidth() - wx.Display().GetClientArea().GetWidth() + self.preview3d.SetMinSize(self.preview3d.GetMinSize().DecBy(f, 0)) + self.Fit() self.SetMinSize(self.GetSize()) self.Centre() self.Show(True) -- 2.30.2