From fa16db08c1b371645d46b3938977a2ffa9c12496 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 28 Feb 2019 23:24:40 +0100 Subject: [PATCH] Remove the extra height hack from wxToolBar::DoGetBestSize() There doesn't seem to be any good reason to add 3px to the vertical component of the toolbar best size and it's not clear how can the original problem be reproduced. This basically reverts c118d8b06e867235a050add7cf89564923de3387. --- src/msw/toolbar.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index a9e436f25d..7654ab8106 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -597,14 +597,6 @@ wxSize wxToolBar::DoGetBestSize() const sizeBest.IncTo(wxSize(-1, MSWGetFittingtSizeForControl(tool).y)); } } - - // 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 ++; } return sizeBest;