From: Václav Slavík Date: Fri, 1 Feb 2008 22:28:10 +0000 (+0000) Subject: fixed RR's change of wxSizer::Fit to set client size (r50717) to not be completely... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/02dc0099cb39b6126ff5c92e521a00c2d9e85313?ds=inline fixed RR's change of wxSizer::Fit to set client size (r50717) to not be completely broken; it no longer confuses client and window sizes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 9a0cb0fcf7..eb5eb59bbe 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -837,7 +837,7 @@ void wxSizer::DeleteWindows() wxSize wxSizer::Fit( wxWindow *window ) { // take the min size by default and limit it by max size - wxSize size = GetMinWindowSize(window); + wxSize size = GetMinClientSize(window); wxTopLevelWindow *tlw = wxDynamicCast(window, wxTopLevelWindow); if ( tlw ) @@ -878,7 +878,7 @@ wxSize wxSizer::Fit( wxWindow *window ) } else { - wxSize sizeMax = GetMaxWindowSize(window); + wxSize sizeMax = GetMaxClientSize(window); if ( sizeMax.x != wxDefaultCoord && size.x > sizeMax.x ) size.x = sizeMax.x;