]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/nbkbase.cpp
removed platform-specific code for wxFindFirst/NextFile and replaced it with a generi...
[wxWidgets.git] / src / common / nbkbase.cpp
index c493e023803297ff4f13d6dbf21a39d1996e1c3e..ccc78efd571a3f26b6bb13e006704ebde51a7ffd 100644 (file)
@@ -91,10 +91,28 @@ 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;
+    
+    // Mac has large notebook borders.
+
     if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
+    {
         sizeTotal.x += 90;
+#ifdef __WXMAC__
+        sizeTotal.y += 28;
+#else
+        sizeTotal.y += 10;
+#endif
+    }
     else
+    {
+#ifdef __WXMAC__
+        sizeTotal.x += 34;   // This is OK for Aqua.
+        sizeTotal.y += 46;
+#else
+        sizeTotal.x += 10;
         sizeTotal.y += 40;
+#endif
+    }
 
     return sizeTotal;
 }
@@ -120,7 +138,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;
 }