From eaf336e02ad6fbb60113181ff4c1dd081ef38f63 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 4 Dec 2001 17:22:05 +0000 Subject: [PATCH] Notebook sizers didn't take any borders into account, 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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/common/nbkbase.cpp b/src/common/nbkbase.cpp index 436364a179..0a9993361c 100644 --- a/src/common/nbkbase.cpp +++ b/src/common/nbkbase.cpp @@ -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; } -- 2.45.2