Add spacers

main
Micke Nordin 3 years ago
parent 1670d56bc3
commit 1f7a47b7e7
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -85,6 +85,7 @@ class Cast(wx.Frame):
def show_provider_list(self, _) -> None: def show_provider_list(self, _) -> None:
self.m_sizer.Clear(delete_windows=True) self.m_sizer.Clear(delete_windows=True)
self.m_sizer = wx.BoxSizer(wx.VERTICAL) self.m_sizer = wx.BoxSizer(wx.VERTICAL)
self.m_sizer.AddStretchSpacer()
closebtn = wx.Button(self.m_panel, -1, label="Close", size=(WIDTH, BTN_HEIGHT)) closebtn = wx.Button(self.m_panel, -1, label="Close", size=(WIDTH, BTN_HEIGHT))
closebtn.Bind(wx.EVT_BUTTON, lambda event: self.Destroy()) closebtn.Bind(wx.EVT_BUTTON, lambda event: self.Destroy())
self.m_sizer.Add(closebtn) self.m_sizer.Add(closebtn)
@ -106,6 +107,7 @@ class Cast(wx.Frame):
self.m_selected_provider = self.m_providers[provider_index] self.m_selected_provider = self.m_providers[provider_index]
self.m_sizer.Clear(delete_windows=True) self.m_sizer.Clear(delete_windows=True)
self.m_sizer = wx.BoxSizer(wx.VERTICAL) self.m_sizer = wx.BoxSizer(wx.VERTICAL)
self.m_sizer.AddStretchSpacer()
bck_callback = lambda event: self.show_provider_list(event) bck_callback = lambda event: self.show_provider_list(event)
self.add_back_button(bck_callback) self.add_back_button(bck_callback)
channel_index = 0 channel_index = 0
@ -124,6 +126,7 @@ class Cast(wx.Frame):
def show_video_list(self, _, index=0) -> None: def show_video_list(self, _, index=0) -> None:
self.m_sizer.Clear(delete_windows=True) self.m_sizer.Clear(delete_windows=True)
self.m_sizer = wx.BoxSizer(wx.VERTICAL) self.m_sizer = wx.BoxSizer(wx.VERTICAL)
self.m_sizer.AddStretchSpacer()
channel = self.m_selected_provider.get_channel_by_index(index) channel = self.m_selected_provider.get_channel_by_index(index)
if channel.wait(): if channel.wait():
with wx.BusyInfo("Please wait, working..."): with wx.BusyInfo("Please wait, working..."):
@ -172,8 +175,8 @@ class Cast(wx.Frame):
self.m_sizer = wx.GridBagSizer() self.m_sizer = wx.GridBagSizer()
self.m_control = wx.media.MediaCtrl( self.m_control = wx.media.MediaCtrl(
self.m_panel, self.m_panel,
size=(WIDTH, HEIGHT/2), # size=(WIDTH, HEIGHT/2),
style=wx.SIMPLE_BORDER, # style=wx.SIMPLE_BORDER,
szBackend=wx.media.MEDIABACKEND_GSTREAMER, szBackend=wx.media.MEDIABACKEND_GSTREAMER,
) )
play_button = wx.Button(self.m_panel, -1, "Play") play_button = wx.Button(self.m_panel, -1, "Play")

Loading…
Cancel
Save