]> git.saurik.com Git - wxWidgets.git/commitdiff
use SetClientSize(), not SetSize() in Fit()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 30 Aug 2003 22:39:56 +0000 (22:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 30 Aug 2003 22:39:56 +0000 (22:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/sizer.cpp

index e121731de814863e0a75c781f9a4f726776b268f..71ed6cb4b6e59462632f51f25f3f5b7f087b0286 100644 (file)
@@ -563,13 +563,10 @@ void wxSizer::DeleteWindows()
 
 wxSize wxSizer::Fit( wxWindow *window )
 {
 
 wxSize wxSizer::Fit( wxWindow *window )
 {
-    wxSize size;
-    if (window->IsTopLevel())
-        size = FitSize( window );
-    else
-        size = GetMinWindowSize( window );
+    wxSize size(window->IsTopLevel() ? FitSize(window)
+                                     : GetMinWindowSize(window));
 
 
-    window->SetSize( size );
+    window->SetClientSize( size );
 
     return size;
 }
 
     return size;
 }