From: daid Date: Tue, 24 Jul 2012 08:26:34 +0000 (+0200) Subject: Reduce the 3D preview window size if the main window will not fit on the screen.... X-Git-Tag: 12.08~27 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=aad4fd876997d3c76d72093e3b80ae2e70989e36;p=cura.git Reduce the 3D preview window size if the main window will not fit on the screen. #177 --- 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)