Implement wxBookCtrlBase::CalcSizeFromPage() in the base class.
The definition of this method was needlessly duplicated in all of wx{Choice,List,Tool,Tree}book and in all of them except the first one it didn't account correctly for the case when the size of the controller was greater than the size of the page. Avoid the duplication and fix the best size determination in such case by providing a single, correct version of the function in the base class itself. Closes #11793. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -141,7 +141,10 @@ public:
|
||||
wxSize GetControllerSize() const;
|
||||
|
||||
// calculate the size of the control from the size of its page
|
||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
|
||||
//
|
||||
// by default this simply returns size enough to fit both the page and the
|
||||
// controller
|
||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
|
||||
|
||||
// get/set size of area between book control area and page area
|
||||
unsigned int GetInternalBorder() const { return m_internalBorder; }
|
||||
|
Reference in New Issue
Block a user