Fixed best size of wxUniv's wxNotebook.
Removed wxNotebook::DoGetBestClientSize to let wxBookCtrlBase::DoGetBestSize do its job and fix the best size of a wxNotebook (formerly when running the notebook sample the notebook was not wide enough). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -130,7 +130,6 @@ protected:
|
|||||||
void DoDrawTab(wxDC& dc, const wxRect& rect, size_t n);
|
void DoDrawTab(wxDC& dc, const wxRect& rect, size_t n);
|
||||||
|
|
||||||
// resizing
|
// resizing
|
||||||
virtual wxSize DoGetBestClientSize() const;
|
|
||||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||||
virtual void DoSetSize(int x, int y,
|
virtual void DoSetSize(int x, int y,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
|
@@ -1258,34 +1258,6 @@ void wxNotebook::ScrollLastTo(size_t page)
|
|||||||
// wxNotebook sizing/moving
|
// wxNotebook sizing/moving
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSize wxNotebook::DoGetBestClientSize() const
|
|
||||||
{
|
|
||||||
// calculate the max page size
|
|
||||||
wxSize size;
|
|
||||||
|
|
||||||
size_t count = GetPageCount();
|
|
||||||
if ( count )
|
|
||||||
{
|
|
||||||
for ( size_t n = 0; n < count; n++ )
|
|
||||||
{
|
|
||||||
wxSize sizePage = m_pages[n]->GetSize();
|
|
||||||
|
|
||||||
if ( size.x < sizePage.x )
|
|
||||||
size.x = sizePage.x;
|
|
||||||
if ( size.y < sizePage.y )
|
|
||||||
size.y = sizePage.y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // no pages
|
|
||||||
{
|
|
||||||
// use some arbitrary default size
|
|
||||||
size.x =
|
|
||||||
size.y = 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetSizeForPage(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxNotebook::DoMoveWindow(int x, int y, int width, int height)
|
void wxNotebook::DoMoveWindow(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
wxControl::DoMoveWindow(x, y, width, height);
|
wxControl::DoMoveWindow(x, y, width, height);
|
||||||
|
Reference in New Issue
Block a user