From: Vadim Zeitlin Date: Fri, 5 Mar 2010 23:55:04 +0000 (+0000) Subject: Correct controller size determination in wxToolbook. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7019c4a5e63669cb6caae262ebd3bbcd5c6446cd Correct controller size determination in wxToolbook. The old code used the current toolbar size instead of determining its best size for some strange reason and this resulted in toolbar remaining of tiny (1 pixel) height at least under wxGTK. Fix this by simply using the best size of the toolbar. Closes #11606. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index 20b36fb462..fd642cc935 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -132,8 +132,7 @@ bool wxToolbook::Create(wxWindow *parent, wxSize wxToolbook::GetControllerSize() const { const wxSize sizeClient = GetClientSize(), - sizeBorder = m_bookctrl->GetSize() - m_bookctrl->GetClientSize(), - sizeToolBar = GetToolBar()->GetSize() + sizeBorder; + sizeToolBar = GetToolBar()->GetBestSize(); wxSize size;