removed the pad from wxWindow::DoGetBestSize(), now do it in Fit() only

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-20 15:32:30 +00:00
parent 9ef6ff8c4d
commit ba81034d1a

View File

@@ -402,7 +402,14 @@ void wxWindowBase::Fit()
{
if ( GetChildren().GetCount() > 0 )
{
SetClientSize(DoGetBestSize());
wxSize size = DoGetBestSize();
// for compatibility with the old versions and because it really looks
// slightly more pretty like this, add a pad
size.x += 7;
size.y += 14;
SetClientSize(size);
}
//else: do nothing if we have no children
}
@@ -446,8 +453,7 @@ wxSize wxWindowBase::DoGetBestSize() const
maxY = wy + wh;
}
// leave a margin
return wxSize(maxX + 7, maxY + 14);
return wxSize(maxX, maxY);
}
else
{