Skip to content

Commit 673e66a

Browse files
authored
style: Improve layout and resizing of WX Python application components (#7)
1 parent c82f11b commit 673e66a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

user/STAR.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def __init__(self, parent = None):
288288
self.run_local_btn.Enabled = config.get("host", "") != "local"
289289
wx.Button(self.connecting_panel, label = "&Options").Bind(wx.EVT_BUTTON, self.on_options)
290290
wx.Button(self.connecting_panel, label = "&Exit").Bind(wx.EVT_BUTTON, self.on_exit_btn)
291-
self.main_sizer = wx.BoxSizer()
291+
self.main_sizer = wx.BoxSizer(wx.VERTICAL)
292292
wx.StaticText(self.main_panel, -1, "&Voices")
293293
self.voices_list = VirtualSmartList(parent = self.main_panel, style = wx.LC_REPORT | wx.LC_SINGLE_SEL, get_virtual_item = lambda v: self.voices[v], update_cache = lambda v_from, v_to: self.voices[v_from:v_to + 1])
294294
self.voices_list.SetLabel("Voices")
@@ -356,6 +356,10 @@ def __init__(self, parent = None):
356356
self.render_total = 0
357357
self.Show()
358358
self.Centre()
359+
sizer = wx.BoxSizer(wx.VERTICAL)
360+
sizer.Add(self.connecting_panel, 1, wx.EXPAND)
361+
sizer.Add(self.main_panel, 1, wx.EXPAND)
362+
self.SetSizer(sizer)
359363
self.connection_abort = threading.Event()
360364
if "host" in config and config["host"] != "" and not self.configuration.validate():
361365
r = self.on_options()

0 commit comments

Comments
 (0)