X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e63fdcd600e2eb717a19f9fa2895e9256e83c890..28be2e8a170979d476a5ea4f585505b8a2f5af27:/src/common/wincmn.cpp 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 {