}
}
-void wxSizer::Fit( wxWindow *window )
+wxSize wxSizer::Fit( wxWindow *window )
{
wxSize size;
if (window->IsTopLevel())
else
size = GetMinWindowSize( window );
- //window->SetClientSize( size );
window->SetSize( size );
+
+ return size;
}
void wxSizer::FitInside( wxWindow *window )
// Preserve the window's max size hints, but set the
// lower bound according to the sizer calculations.
- Fit( window );
- wxSize size( window->GetSize() );
+ wxSize size = Fit( window );
+
window->SetSizeHints( size.x,
size.y,
window->GetMaxWidth(),
return wxDefaultSize;
}
-wxSize wxSizer::GetMinClientSize( wxWindow *window )
+wxSize wxSizer::GetMinClientSize( wxWindow *WXUNUSED(window) )
{
return GetMinSize(); // Already returns client size.
}