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
This commit is contained in:
Robert Roebling
2001-12-04 17:22:05 +00:00
parent eddd3a9d37
commit eaf336e02a

View 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;
}