]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/nbkbase.cpp
Added missing header and missing logic. :)
[wxWidgets.git] / src / common / nbkbase.cpp
index 436364a179b591103ef003a3e147f87a182d7078..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;
     // 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) )
     if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
+    {
         sizeTotal.x += 90;
         sizeTotal.x += 90;
+#ifdef __WXMAC__
+        sizeTotal.y += 28;
+#else
+        sizeTotal.y += 10;
+#endif
+    }
     else
     else
+    {
+#ifdef __WXMAC__
+        sizeTotal.x += 34;   // This is OK for Aqua.
+        sizeTotal.y += 46;
+#else
+        sizeTotal.x += 10;
         sizeTotal.y += 40;
         sizeTotal.y += 40;
+#endif
+    }
 
     return sizeTotal;
 }
 
     return sizeTotal;
 }