X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c7789014106c9269b0f4ecc1a3071b14f351d3f..32fc355f09c485ea0294c8a7aebf930598d67d31:/src/generic/choicbkg.cpp diff --git a/src/generic/choicbkg.cpp b/src/generic/choicbkg.cpp index 9ba0e545e4..057071f96e 100644 --- a/src/generic/choicbkg.cpp +++ b/src/generic/choicbkg.cpp @@ -143,11 +143,15 @@ wxSize wxChoicebook::CalcSizeFromPage(const wxSize& sizePage) const wxSize size = sizePage; if ( IsVertical() ) { + if ( sizeChoice.x > sizePage.x ) + size.x = sizeChoice.x; size.y += sizeChoice.y + GetInternalBorder(); } else // left/right aligned { size.x += sizeChoice.x + GetInternalBorder(); + if ( sizeChoice.y > sizePage.y ) + size.y = sizeChoice.y; } return size; @@ -185,9 +189,16 @@ bool wxChoicebook::SetPageImage(size_t WXUNUSED(n), int WXUNUSED(imageId)) } // ---------------------------------------------------------------------------- -// image list stuff +// miscellaneous other stuff // ---------------------------------------------------------------------------- +void wxChoicebook::DoSetWindowVariant(wxWindowVariant variant) +{ + wxCHECK_RET( m_bookctrl, "can't be called before control creation" ); + + m_bookctrl->SetWindowVariant(variant); +} + void wxChoicebook::SetImageList(wxImageList *imageList) { // TODO: can be implemented in form of static bitmap near choice control