Change wxBoxSizer::AddSpacer() to only add space in sizer direction.

It used to add a spacer with the given size in both directions but this was
counter-intuitive and wasn't expected even by the original author of this code
so change it to behave more reasonably.

Closes #11197.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-09-15 17:05:32 +00:00
parent d1b5dd5596
commit 1a2df6a75b
4 changed files with 33 additions and 3 deletions

View File

@@ -1982,6 +1982,11 @@ void wxFlexGridSizer::RemoveGrowableRow( size_t idx )
// wxBoxSizer
//---------------------------------------------------------------------------
wxSizerItem *wxBoxSizer::AddSpacer(int size)
{
return IsVertical() ? Add(0, size) : Add(size, 0);
}
void wxBoxSizer::RecalcSizes()
{
if ( m_children.empty() )