Put player in another sizer

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

@ -172,7 +172,9 @@ class Cast(wx.Frame):
:param uri str: the link to the video stream
"""
self.m_sizer.Clear(delete_windows=True)
self.m_sizer = wx.GridBagSizer()
self.m_sizer = wx.BoxSizer(wx.VERTICAL)
self.m_sizer.AddStretchSpacer()
inner_sizer = wx.GridBagSizer()
self.m_control = wx.media.MediaCtrl(
self.m_panel,
# size=(WIDTH, HEIGHT/2),
@ -189,11 +191,11 @@ class Cast(wx.Frame):
lambda event, index=provider_index: self.show_video_list(event, index),
)
self.m_sizer.Add(self.m_control, (0, 0))
self.m_sizer.SetItemSpan(0, (0, 6))
self.m_sizer.Add(play_button, (1, 1))
self.m_sizer.Add(pause_button, (1, 2))
self.m_sizer.Add(back_button, (1, 3))
inner_sizer.Add(self.m_control, (0, 0))
inner_sizer.SetItemSpan(0, (0, 6))
inner_sizer.Add(play_button, (1, 1))
inner_sizer.Add(pause_button, (1, 2))
inner_sizer.Add(back_button, (1, 3))
if not self.m_chromecast_thr.is_alive() and not self.m_selected_chromecast:
chromecast_button = wx.Button(self.m_panel, -1, "Cast")
@ -203,7 +205,8 @@ class Cast(wx.Frame):
event, muri, index
),
)
self.m_sizer.Add(chromecast_button, (2, 2))
inner_sizer.Add(chromecast_button, (2, 2))
self.m_sizer.Add(inner_sizer)
if self.m_selected_chromecast:
self.Bind(
@ -228,6 +231,7 @@ class Cast(wx.Frame):
def select_chromecast(self, _, uri, provider_index):
self.m_sizer.Clear(delete_windows=True)
self.m_sizer = wx.BoxSizer(wx.VERTICAL)
self.m_sizer.AddStretchSpacer()
cancel_btn = wx.Button(self.m_panel, -1, "Cancel", size=(WIDTH, BTN_HEIGHT), style=wx.BU_EXACTFIT)
cancel_btn.Bind(

Loading…
Cancel
Save