diff --git a/src/main.py b/src/main.py index 6ef65a8..13aa9a3 100644 --- a/src/main.py +++ b/src/main.py @@ -194,6 +194,15 @@ class Cast(wx.Frame): pane_sizer.Add(description, wx.GROW | wx.ALL, 2) pane_win.SetSizer(pane_sizer) pane_sizer.SetSizeHints(pane_win) + def fit_and_layout(_): + pane_sizer.Layout() + pane_sizer.Fit(pane_win) + inner_sizer.Layout() + inner_sizer.Fit(self) + self.m_sizer.Fit(self) + self.m_sizer.Layout() + + collapsable_pane.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED, lambda event: fit_and_layout(event) ) #inner_sizer.Add(description) self.m_sizer.Add(inner_sizer) self.m_sizer.AddSpacer(SPACER_HEIGHT)