X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d6f2a8911e509fd9e61f881cc881a97f5aa05ae8..a738f87caeafd5e51fc029a6228c540e942505b7:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 54547adf94..86b92ac035 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -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);