diff --git a/src/main.py b/src/main.py index b664602..6ef65a8 100644 --- a/src/main.py +++ b/src/main.py @@ -167,12 +167,11 @@ class Cast(wx.Frame): for item in channel.get_items(): # type: ignore inner_sizer = wx.BoxSizer(wx.VERTICAL) + pane_sizer = wx.BoxSizer(wx.VERTICAL) title = wx.StaticText(self.m_panel, -1) title.SetLabelMarkup("{}".format( item["title"])) - description = wx.StaticText(self.m_panel, -1, item["description"]) - description.Wrap(WIDTH - 2) bitmap = item["thumbnail"] btn = wx.BitmapButton(self.m_panel, id=self.m_index, @@ -185,7 +184,17 @@ class Cast(wx.Frame): ) inner_sizer.Add(title) inner_sizer.Add(btn) - inner_sizer.Add(description) + collapsable_pane = wx.CollapsiblePane(self.m_panel, wx.ID_ANY, "Details:") + inner_sizer.Add(collapsable_pane, 0, wx.GROW | wx.ALL, 5) + pane_win = collapsable_pane.GetPane() + # now add a test label in the collapsible pane using a sizer to layout it: + description = wx.StaticText(pane_win, -1, item["description"]) + description.Wrap(WIDTH - 2) + + pane_sizer.Add(description, wx.GROW | wx.ALL, 2) + pane_win.SetSizer(pane_sizer) + pane_sizer.SetSizeHints(pane_win) + #inner_sizer.Add(description) self.m_sizer.Add(inner_sizer) self.m_sizer.AddSpacer(SPACER_HEIGHT) self.m_index = self.m_index + 1