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): ...@@ -114,7 +114,7 @@ class MainWindow(wx.Frame):
super(MainWindow, self).__init__(*args, **kwargs) super(MainWindow, self).__init__(*args, **kwargs)
# this list will contain all controls that should be only enabled # this list will contain all controls that should be only enabled
# when we're connected to a printer # 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.reset_ui()
self.statefulControls = [] self.statefulControls = []
......
...@@ -165,13 +165,14 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -165,13 +165,14 @@ class PronterWindow(MainWindow, pronsole.pronsole):
# consequences. # consequences.
# -- Okai, it seems it breaks things like update_gviz_params >< # -- Okai, it seems it breaks things like update_gviz_params ><
os.putenv("UBUNTU_MENUPROXY", "0") os.putenv("UBUNTU_MENUPROXY", "0")
size = (self.settings.last_window_width, self.settings.last_window_height) style = wx.DEFAULT_FRAME_STYLE
MainWindow.__init__(self, None, title = _("Pronterface"), size = size)
if self.settings.last_window_maximized: 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_SIZE, self.on_resize)
self.Bind(wx.EVT_MAXIMIZE, self.on_maximize) self.Bind(wx.EVT_MAXIMIZE, self.on_maximize)
self.SetIcon(wx.Icon(iconfile("pronterface.png"), wx.BITMAP_TYPE_PNG))
self.window_ready = True self.window_ready = True
self.display_graph = self.settings.tempgraph 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