chiark / gitweb /
Reduce the 3D preview window size if the main window will not fit on the screen....
authordaid <daid303@gmail.com>
Tue, 24 Jul 2012 08:26:34 +0000 (10:26 +0200)
committerdaid <daid303@gmail.com>
Tue, 24 Jul 2012 08:26:34 +0000 (10:26 +0200)
Cura/gui/mainWindow.py

index 49df64fa29674fb5814c9e9a0e1e35635be194b5..c1d4610e950dc7f87d604a0ad5011458e664640a 100644 (file)
@@ -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)