X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10199e27d54df4a0a2a7b2577645ce4561e8ed5f..878711c01c1b9ad5b97d35f379a048b8ce1bfb49:/src/common/nbkbase.cpp?ds=sidebyside diff --git a/src/common/nbkbase.cpp b/src/common/nbkbase.cpp index aabd7476dd..527fcc27db 100644 --- a/src/common/nbkbase.cpp +++ b/src/common/nbkbase.cpp @@ -31,10 +31,11 @@ #if wxUSE_NOTEBOOK #ifndef WX_PRECOMP - #include "wx/notebook.h" - #include "wx/imaglist.h" #endif //WX_PRECOMP +#include "wx/imaglist.h" +#include "wx/notebook.h" + // ============================================================================ // implementation // ============================================================================ @@ -90,10 +91,17 @@ wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) // this was just taken from wxNotebookSizer::CalcMin() and is, of // course, totally bogus - just like the original code was wxSize sizeTotal = sizePage; + if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) ) + { sizeTotal.x += 90; + sizeTotal.y += 10; + } else + { + sizeTotal.x += 10; sizeTotal.y += 40; + } return sizeTotal; } @@ -119,7 +127,7 @@ wxNotebookPage *wxNotebookBase::DoRemovePage(int nPage) _T("invalid page index in wxNotebookBase::DoRemovePage()") ); wxNotebookPage *pageRemoved = m_pages[nPage]; - m_pages.Remove(nPage); + m_pages.RemoveAt(nPage); return pageRemoved; }