Commit d68ff6ac authored by Guillaume Seguin's avatar Guillaume Seguin

Restore ClientSize correctly instead of restoring it as Size (#520)

parent a4cc6b27
......@@ -114,7 +114,7 @@ class MainWindow(wx.Frame):
super(MainWindow, self).__init__(*args, **kwargs)
# this list will contain all controls that should be only enabled
# when we're connected to a printer
self.panel = wx.Panel(self, -1, size = kwargs["size"])
self.panel = wx.Panel(self, -1)
self.reset_ui()
self.statefulControls = []
......
......@@ -165,13 +165,14 @@ class PronterWindow(MainWindow, pronsole.pronsole):
# consequences.
# -- Okai, it seems it breaks things like update_gviz_params ><
os.putenv("UBUNTU_MENUPROXY", "0")
size = (self.settings.last_window_width, self.settings.last_window_height)
MainWindow.__init__(self, None, title = _("Pronterface"), size = size)
style = wx.DEFAULT_FRAME_STYLE
if self.settings.last_window_maximized:
self.Maximize()
style |= wx.MAXIMIZE
MainWindow.__init__(self, None, title = _("Pronterface"), style = style)
self.SetClientSize(size)
self.SetIcon(wx.Icon(iconfile("pronterface.png"), wx.BITMAP_TYPE_PNG))
self.Bind(wx.EVT_SIZE, self.on_resize)
self.Bind(wx.EVT_MAXIMIZE, self.on_maximize)
self.SetIcon(wx.Icon(iconfile("pronterface.png"), wx.BITMAP_TYPE_PNG))
self.window_ready = True
self.display_graph = self.settings.tempgraph
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment