don't add 7 and 14 pixel horz/vertical padding in DoGetBestSize() when the best size is computed from the existing children
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
344d066d17
commit
54af24613f
@ -497,7 +497,8 @@ wxSize wxWindowBase::DoGetBestSize() const
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// our minimal acceptable size is such that all our visible child windows fit inside
|
// our minimal acceptable size is such that all our visible child
|
||||||
|
// windows fit inside
|
||||||
int maxX = 0,
|
int maxX = 0,
|
||||||
maxY = 0;
|
maxY = 0;
|
||||||
|
|
||||||
@ -506,9 +507,10 @@ wxSize wxWindowBase::DoGetBestSize() const
|
|||||||
node = node->GetNext() )
|
node = node->GetNext() )
|
||||||
{
|
{
|
||||||
wxWindow *win = node->GetData();
|
wxWindow *win = node->GetData();
|
||||||
if ( win->IsTopLevel() || ( ! win->IsShown() )
|
if ( win->IsTopLevel()
|
||||||
|
|| !win->IsShown()
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
|| wxDynamicCast(win, wxStatusBar)
|
|| wxDynamicCast(win, wxStatusBar)
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -535,11 +537,6 @@ wxSize wxWindowBase::DoGetBestSize() const
|
|||||||
maxY = wy + wh;
|
maxY = wy + wh;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for compatibility with the old versions and because it really looks
|
|
||||||
// slightly more pretty like this, add a pad
|
|
||||||
maxX += 7;
|
|
||||||
maxY += 14;
|
|
||||||
|
|
||||||
best = wxSize(maxX, maxY);
|
best = wxSize(maxX, maxY);
|
||||||
}
|
}
|
||||||
else // ! has children
|
else // ! has children
|
||||||
|
Loading…
Reference in New Issue
Block a user