]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
Add accelerator back to label in GetItemLabel
[wxWidgets.git] / src / msw / tbar95.cpp
index 54547adf94dd05eeacdf9ca3e7c4fec151bca5a3..86b92ac0350cc88252cb4df1d4255be216ebde40 100644 (file)
@@ -405,8 +405,16 @@ wxSize wxToolBar::DoGetBestSize() const
         sizeBest.y = size.cy;
     }
 
-    if (!IsVertical() && !(GetWindowStyle() & wxTB_NODIVIDER))
-        sizeBest.y += 1;
+    if (!IsVertical())
+    {
+        // Without the extra height, DoGetBestSize can report a size that's
+        // smaller than the actual window, causing windows to overlap slightly
+        // in some circumstances, leading to missing borders (especially noticeable
+        // in AUI layouts).
+        if (!(GetWindowStyle() & wxTB_NODIVIDER))
+            sizeBest.y += 2;
+        sizeBest.y ++;
+       }
 
     CacheBestSize(sizeBest);