]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed best size of wxUniv's wxNotebook.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Thu, 25 Aug 2011 23:32:05 +0000 (23:32 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Thu, 25 Aug 2011 23:32:05 +0000 (23:32 +0000)
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

include/wx/univ/notebook.h
src/univ/notebook.cpp

index 81fa7bf3a091281ec013a0faaa556da3d0d62b92..bbc4250be93b22ad252dce4559396236db2b7df2 100644 (file)
@@ -130,7 +130,6 @@ protected:
     void DoDrawTab(wxDC& dc, const wxRect& rect, size_t n);
 
     // resizing
-    virtual wxSize DoGetBestClientSize() const;
     virtual void DoMoveWindow(int x, int y, int width, int height);
     virtual void DoSetSize(int x, int y,
                            int width, int height,
index 44129b423b663b6b704f30fab6efe93387a4e82e..da13abe041bf90642ef23cd9380ff9d67238fc94 100644 (file)
@@ -1258,34 +1258,6 @@ void wxNotebook::ScrollLastTo(size_t page)
 // 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)
 {
     wxControl::DoMoveWindow(x, y, width, height);