X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..4e5a4c69c540b430fba8efe5dae1bc1ffd5caeca:/src/mac/notebmac.cpp diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index aa5351acc5..f9bf5dc999 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -143,6 +143,41 @@ wxNotebook::~wxNotebook() m_macControl = NULL ; } +wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) +{ + wxSize sizeTotal = sizePage; + + int major,minor; + wxGetOsVersion( &major, &minor ); + + // Mac has large notebook borders. Aqua even more so. + + if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) ) + { + sizeTotal.x += 90; + + if (major >= 10) + sizeTotal.y += 28; + else + sizeTotal.y += 20; + } + else + { + if (major >= 10) + { + sizeTotal.x += 34; + sizeTotal.y += 46; + } + else + { + sizeTotal.x += 22; + sizeTotal.y += 44; + } + } + + return sizeTotal; +} + // ---------------------------------------------------------------------------- // wxNotebook accessors // ----------------------------------------------------------------------------