X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fc77f30f423b59b826103bd28c57a437c1553ab..a1900c9e1d07ac71f373f94656bf26a45f032c39:/src/cocoa/checkbox.mm diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index 921a1d3a28..1dfd1f6331 100644 --- a/src/cocoa/checkbox.mm +++ b/src/cocoa/checkbox.mm @@ -35,8 +35,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid, if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; m_cocoaNSView = NULL; - NSRect cocoaRect = NSMakeRect(10,10,20,20); - SetNSButton([[NSButton alloc] initWithFrame: cocoaRect]); + SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; [GetNSButton() setButtonType: NSSwitchButton]; [GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]]; @@ -44,6 +43,8 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid, if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; }