Commit 03c6a905 authored by Guillaume Seguin's avatar Guillaume Seguin

Use a SplitterWindow to hold viz & log panes

parent 9c5760ed
...@@ -527,7 +527,20 @@ class MainWindow(wx.Frame): ...@@ -527,7 +527,20 @@ class MainWindow(wx.Frame):
left_sizer = wx.BoxSizer(wx.VERTICAL) left_sizer = wx.BoxSizer(wx.VERTICAL)
left_sizer.Add(left_pane, 0) left_sizer.Add(left_pane, 0)
self.lowersizer.Add(left_sizer, 0, wx.EXPAND) self.lowersizer.Add(left_sizer, 0, wx.EXPAND)
if not compact: # Use a splitterwindow to group viz and log
rightpanel = self.newPanel(lowerpanel)
rightsizer = wx.BoxSizer(wx.VERTICAL)
rightpanel.SetSizer(rightsizer)
self.splitterwindow = wx.SplitterWindow(rightpanel, style = wx.SP_3D)
self.splitterwindow.SetMinimumPaneSize(150)
self.splitterwindow.SetSashGravity(0.5)
rightsizer.Add(self.splitterwindow, 1, wx.EXPAND)
vizpanel = self.newPanel(self.splitterwindow)
logpanel = self.newPanel(self.splitterwindow)
self.splitterwindow.SplitVertically(vizpanel, logpanel, 0)
else:
vizpanel = self.newPanel(lowerpanel) vizpanel = self.newPanel(lowerpanel)
logpanel = self.newPanel(lowerpanel)
viz_pane = VizPane(self, vizpanel) viz_pane = VizPane(self, vizpanel)
# Custom buttons # Custom buttons
self.centersizer = wx.GridBagSizer() self.centersizer = wx.GridBagSizer()
...@@ -535,14 +548,12 @@ class MainWindow(wx.Frame): ...@@ -535,14 +548,12 @@ class MainWindow(wx.Frame):
self.centerpanel.SetSizer(self.centersizer) self.centerpanel.SetSizer(self.centersizer)
viz_pane.Add(self.centerpanel, 0, flag = wx.ALIGN_CENTER) viz_pane.Add(self.centerpanel, 0, flag = wx.ALIGN_CENTER)
vizpanel.SetSizer(viz_pane) vizpanel.SetSizer(viz_pane)
self.lowersizer.Add(vizpanel, 1, wx.EXPAND | wx.ALIGN_CENTER)
logpanel = self.newPanel(lowerpanel)
log_pane = LogPane(self, logpanel) log_pane = LogPane(self, logpanel)
logpanel.SetSizer(log_pane) logpanel.SetSizer(log_pane)
if compact: if not compact:
left_sizer.Add(logpanel, 1, wx.EXPAND) self.lowersizer.Add(rightpanel, 1, wx.EXPAND)
else: else:
self.lowersizer.Add(logpanel, 1, wx.EXPAND) left_sizer.Add(logpanel, 1, wx.EXPAND)
self.mainsizer.Add(upperpanel, 0) self.mainsizer.Add(upperpanel, 0)
self.mainsizer.Add(lowerpanel, 1, wx.EXPAND) self.mainsizer.Add(lowerpanel, 1, wx.EXPAND)
self.panel.SetSizer(self.mainsizer) self.panel.SetSizer(self.mainsizer)
......
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