]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
don't add 7 and 14 pixel horz/vertical padding in DoGetBestSize() when the best size...
[wxWidgets.git] / src / common / wincmn.cpp
index 7bf7177a6aa6d668803258e44f89cd2fd72b78d5..8fbcbc966b452000e4530909128f9276d4f0f0fa 100644 (file)
@@ -497,7 +497,8 @@ wxSize wxWindowBase::DoGetBestSize() const
 #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,
             maxY = 0;
 
@@ -506,9 +507,10 @@ wxSize wxWindowBase::DoGetBestSize() const
               node = node->GetNext() )
         {
             wxWindow *win = node->GetData();
-            if ( win->IsTopLevel()  || ( ! win->IsShown() )
+            if ( win->IsTopLevel()
+                    || !win->IsShown()
 #if wxUSE_STATUSBAR
-                    || wxDynamicCast(win, wxStatusBar)
+                        || wxDynamicCast(win, wxStatusBar)
 #endif // wxUSE_STATUSBAR
                )
             {
@@ -535,11 +537,6 @@ wxSize wxWindowBase::DoGetBestSize() const
                 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);
     }
     else // ! has children