diff --git a/docs/changes.txt b/docs/changes.txt index db09133f7a..bbe75517be 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -643,6 +643,7 @@ wxOSX: - Generate wxEVT_TEXT_ENTER for wxTE_PASSWORD controls too (mj_smoker). - Send wxIconizeEvent when a window is iconized/restore (Rob Krakora). - Use correct colour for disabled wxStaticText (sbrowne). +- Fix too large top and left margins inside wxStaticBox (sbrowne). - Fix bottom margins sizes for several controls (sbrowne). - Fix initial position of controls with layout insets (Tim Kosse). - Don't allow pasting rich text in non-wxTE_RICH text controls (Tim Kosse). diff --git a/src/osx/cocoa/statbox.mm b/src/osx/cocoa/statbox.mm index 1a346a4d75..95852e7f7b 100644 --- a/src/osx/cocoa/statbox.mm +++ b/src/osx/cocoa/statbox.mm @@ -71,6 +71,9 @@ wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSBox* v = [[wxNSBox alloc] initWithFrame:r]; + NSSize margin = { 0.0, 0.0 }; + [v setContentViewMargins: margin]; + [v sizeToFit]; wxStaticBoxCocoaImpl* c = new wxStaticBoxCocoaImpl( wxpeer, v ); #if !wxOSX_USE_NATIVE_FLIPPED c->SetFlipped(false);