Commit 57baea1a authored by Guillaume Seguin's avatar Guillaume Seguin

Add spacers to main toolbar to group buttons

(also expand toolbar in compact/standard modes)
parent 95567396
...@@ -412,6 +412,9 @@ def MainToolbar(root, parentpanel = None, use_wrapsizer = False): ...@@ -412,6 +412,9 @@ def MainToolbar(root, parentpanel = None, use_wrapsizer = False):
root.connectbtn = make_autosize_button(parentpanel, _("Connect"), root.connect, _("Connect to the printer"), self) root.connectbtn = make_autosize_button(parentpanel, _("Connect"), root.connect, _("Connect to the printer"), self)
root.resetbtn = make_autosize_button(parentpanel, _("Reset"), root.reset, _("Reset the printer"), self) root.resetbtn = make_autosize_button(parentpanel, _("Reset"), root.reset, _("Reset the printer"), self)
self.AddStretchSpacer(prop = 1)
root.loadbtn = make_autosize_button(parentpanel, _("Load file"), root.loadfile, _("Load a 3D model file"), self) root.loadbtn = make_autosize_button(parentpanel, _("Load file"), root.loadfile, _("Load a 3D model file"), self)
root.sdbtn = make_autosize_button(parentpanel, _("SD"), root.sdmenu, _("SD Card Printing"), self) root.sdbtn = make_autosize_button(parentpanel, _("SD"), root.sdmenu, _("SD Card Printing"), self)
root.printerControls.append(root.sdbtn) root.printerControls.append(root.sdbtn)
...@@ -420,6 +423,9 @@ def MainToolbar(root, parentpanel = None, use_wrapsizer = False): ...@@ -420,6 +423,9 @@ def MainToolbar(root, parentpanel = None, use_wrapsizer = False):
root.pausebtn = make_autosize_button(parentpanel, _("Pause"), root.pause, _("Pause Current Print"), self) root.pausebtn = make_autosize_button(parentpanel, _("Pause"), root.pause, _("Pause Current Print"), self)
root.offbtn = make_autosize_button(parentpanel, _("Off"), root.off, _("Turn printer off"), self) root.offbtn = make_autosize_button(parentpanel, _("Off"), root.off, _("Turn printer off"), self)
root.printerControls.append(root.offbtn) root.printerControls.append(root.offbtn)
self.AddStretchSpacer(prop = 4)
if root.settings.lockbox: if root.settings.lockbox:
parentpanel.SetSizer(self) parentpanel.SetSizer(self)
return glob return glob
...@@ -560,7 +566,7 @@ class MainWindow(wx.Frame): ...@@ -560,7 +566,7 @@ class MainWindow(wx.Frame):
else: else:
left_sizer.Add(logpanel, 1, wx.EXPAND) left_sizer.Add(logpanel, 1, wx.EXPAND)
self.lowersizer.Add(vizpanel, 1, wx.EXPAND) self.lowersizer.Add(vizpanel, 1, wx.EXPAND)
self.mainsizer.Add(upperpanel, 0) self.mainsizer.Add(upperpanel, 0, wx.EXPAND)
self.mainsizer.Add(lowerpanel, 1, wx.EXPAND) self.mainsizer.Add(lowerpanel, 1, wx.EXPAND)
self.panel.SetSizer(self.mainsizer) self.panel.SetSizer(self.mainsizer)
self.statusbar = self.CreateStatusBar() self.statusbar = self.CreateStatusBar()
......
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