Reduce the 3D preview window size if the main window will not fit on the screen. #177

This commit is contained in:
daid 2012-07-24 10:26:34 +02:00
parent e4c6f0cb22
commit aad4fd8769

View 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)