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 c118d8b06e.
This commit is contained in:
Vadim Zeitlin
2019-02-28 23:24:40 +01:00
parent 1661f277d5
commit fa16db08c1

View File

@@ -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;