X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da0634c1401743089b1d8be20f9b6bdad0e8085b..c15d9c859c64f28c56d1e61b7d031a74e6018583:/src/cocoa/statbox.mm diff --git a/src/cocoa/statbox.mm b/src/cocoa/statbox.mm index 33320f707c..23dd3261d6 100644 --- a/src/cocoa/statbox.mm +++ b/src/cocoa/statbox.mm @@ -43,3 +43,17 @@ wxStaticBox::~wxStaticBox() SetNSBox(NULL); } +void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const +{ + NSRect contentRect = [[GetNSBox() contentView] frame]; + NSRect thisRect = [m_cocoaNSView frame]; + *borderTop = thisRect.size.height - (contentRect.origin.y+contentRect.size.height); + *borderOther = thisRect.size.width - (contentRect.origin.x+contentRect.size.width); + int nextBorder = contentRect.origin.y; + if(nextBorder > *borderOther) + *borderOther = nextBorder; + nextBorder = contentRect.origin.x; + if(nextBorder > *borderOther) + *borderOther = nextBorder; +} +