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:
@@ -91,10 +91,27 @@ wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage)
|
|||||||
// this was just taken from wxNotebookSizer::CalcMin() and is, of
|
// this was just taken from wxNotebookSizer::CalcMin() and is, of
|
||||||
// course, totally bogus - just like the original code was
|
// course, totally bogus - just like the original code was
|
||||||
wxSize sizeTotal = sizePage;
|
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 += 15;
|
||||||
|
#else
|
||||||
|
sizeTotal.y += 10;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
sizeTotal.x += 28; // This is correct for Aqua.
|
||||||
|
#else
|
||||||
|
sizeTotal.x += 10;
|
||||||
|
#endif
|
||||||
sizeTotal.y += 40;
|
sizeTotal.y += 40;
|
||||||
|
}
|
||||||
|
|
||||||
return sizeTotal;
|
return sizeTotal;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user