]> git.saurik.com Git - wxWidgets.git/commitdiff
Notebook sizers didn't take any borders into account,
authorRobert Roebling <robert@roebling.de>
Tue, 4 Dec 2001 17:22:05 +0000 (17:22 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 4 Dec 2001 17:22:05 +0000 (17:22 +0000)
esc. not those large ones under Aqua which caused
ugly overlapping.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/nbkbase.cpp

index 436364a179b591103ef003a3e147f87a182d7078..0a9993361c4f0e76026753f2f65d67f822d1d0b1 100644 (file)
@@ -91,10 +91,27 @@ 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 += 15;
+#else
+        sizeTotal.y += 10;
+#endif
+    }
     else
+    {
+#ifdef __WXMAC__
+        sizeTotal.x += 28;   // This is correct for Aqua.
+#else
+        sizeTotal.x += 10;
+#endif
         sizeTotal.y += 40;
+    }
 
     return sizeTotal;
 }