Use best controller size in wxBookCtrl best size calculation.

Don't use GetControllerSize() which returns the actual, not the best, size of
the controller.

Closes #11793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-28 13:51:25 +00:00
parent d159e96495
commit 91452726c2

View File

@@ -105,8 +105,13 @@ void wxBookCtrlBase::DoInvalidateBestSize()
wxSize wxBookCtrlBase::CalcSizeFromPage(const wxSize& sizePage) const
{
// we need to add the size of the choice control and the border between
const wxSize sizeController = GetControllerSize();
// We need to add the size of the controller and the border between if it's
// shown. Notice that we don't use GetControllerSize() here as it returns
// the actual size while we want the best size here.
if ( !m_bookctrl || !m_bookctrl->IsShown() )
return sizePage;
const wxSize sizeController = m_bookctrl->GetBestSize();
wxSize size = sizePage;
if ( IsVertical() )