From ba81034d1a2fc216b0da7fca140d2b786478862b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 20 Oct 2000 15:32:30 +0000 Subject: [PATCH] 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 --- src/common/wincmn.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index b95dde4a4b..ca0f43b5f9 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -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 { -- 2.45.2