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:
@@ -402,7 +402,14 @@ void wxWindowBase::Fit()
|
|||||||
{
|
{
|
||||||
if ( GetChildren().GetCount() > 0 )
|
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
|
//else: do nothing if we have no children
|
||||||
}
|
}
|
||||||
@@ -446,8 +453,7 @@ wxSize wxWindowBase::DoGetBestSize() const
|
|||||||
maxY = wy + wh;
|
maxY = wy + wh;
|
||||||
}
|
}
|
||||||
|
|
||||||
// leave a margin
|
return wxSize(maxX, maxY);
|
||||||
return wxSize(maxX + 7, maxY + 14);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user