Commit f35ce9cf authored by iXce's avatar iXce

Merge pull request #280 from cakeller98/experimental

Improve resizing behavior of Pronterface main window
parents 093f6a45 a868e571
...@@ -218,6 +218,8 @@ class gviz(wx.Panel): ...@@ -218,6 +218,8 @@ class gviz(wx.Panel):
def resize(self, event): def resize(self, event):
size = self.GetClientSize() size = self.GetClientSize()
size = [max(1.0, size[0]), max(1.0, size[1])]
self.size = [max(1.0, self.size[0]), max(1.0, self.size[1])]
newsize = min(float(size[0])/self.size[0], float(size[1])/self.size[1]) newsize = min(float(size[0])/self.size[0], float(size[1])/self.size[1])
self.size = self.GetClientSize() self.size = self.GetClientSize()
wx.CallAfter(self.zoom, 0, 0, newsize) wx.CallAfter(self.zoom, 0, 0, newsize)
......
...@@ -794,7 +794,7 @@ class PronterWindow(wx.Frame, pronsole.pronsole): ...@@ -794,7 +794,7 @@ class PronterWindow(wx.Frame, pronsole.pronsole):
self.graph = Graph(self.panel, wx.ID_ANY) self.graph = Graph(self.panel, wx.ID_ANY)
lls.Add(self.graph, pos = (3, 5), span = (3, 3)) lls.Add(self.graph, pos = (3, 5), span = (3, 3))
lls.Add(self.tempdisp, pos = (6, 0), span = (1, 1)) lls.Add(self.tempdisp, pos = (6, 0), span = (1, 9))
self.gviz = gviz.gviz(self.panel, (300, 300), self.gviz = gviz.gviz(self.panel, (300, 300),
build_dimensions = self.build_dimensions_list, build_dimensions = self.build_dimensions_list,
......
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