X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f033830e257227dc73225809de2326db0093e5fe..ba5872682ca221f9f04f2794774f02b5ddf130ab:/src/osx/cocoa/tglbtn.mm diff --git a/src/osx/cocoa/tglbtn.mm b/src/osx/cocoa/tglbtn.mm index d638d955f8..de93bd3bf0 100644 --- a/src/osx/cocoa/tglbtn.mm +++ b/src/osx/cocoa/tglbtn.mm @@ -36,8 +36,7 @@ wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, { NSView* sv = (wxpeer->GetParent()->GetHandle() ); - NSRect r = wxToNSRect( sv, wxRect( pos, size) ); - // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ; + NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; [v setBezelStyle:NSRoundedBezelStyle]; @@ -59,8 +58,7 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, { NSView* sv = (wxpeer->GetParent()->GetHandle() ); - NSRect r = wxToNSRect( sv, wxRect( pos, size) ); - // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ; + NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; [v setBezelStyle:NSRegularSquareBezelStyle];