- // we've changed our size, thus our top level parent needs to relayout
- // itself
- top->Layout();
-
- // FIXME: this makes wxGenericCollapsiblePane behave as the user expect
- // but maybe there are cases where this is unwanted!
- if (top->GetSizer())
-#ifdef __WXGTK__
- // FIXME: the SetSizeHints() call would be required also for GTK+ for
- // the expanded->collapsed transition. Unfortunately if we
- // enable this line, then the GTK+ top window won't always be
- // resized by the SetClientSize() call below! As a side effect
- // of this dirty fix, the minimal size for the pane window is
- // not set in GTK+ and the user can hide it shrinking the "top"
- // window...
- if (IsCollapsed())
-#endif
- top->GetSizer()->SetSizeHints(top);
-
-
- // we shouldn't attempt to resize a maximized window, whatever happens
- if ( !top->IsMaximized() )
- {
- if ( IsCollapsed() )
- {
- // use SetClientSize() and not SetSize() otherwise the size for
- // e.g. a wxFrame with a menubar wouldn't be correctly set
- top->SetClientSize(sz);
- }
- else
- {
- // force our parent to "fit", i.e. expand so that it can honour
- // our minimal size
- top->Fit();
- }
- }