X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f033830e257227dc73225809de2326db0093e5fe..f4bc1aa27cb33f679d7e9c1518a7855bbc1fa471:/src/osx/cocoa/bmpbuttn.mm diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index ac47c4f03f..3de4eafe5f 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/bmpbuttn.cpp +// Name: src/osx/carbon/bmpbuttn.cpp // Purpose: wxBitmapButton // Author: Stefan Csomor // Modified by: @@ -31,14 +31,13 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, long style, long extraStyle) { - NSView* sv = (wxpeer->GetParent()->GetHandle() ); + NSView* sv = static_cast(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]; - + [v setImage:bitmap.GetNSImage() ]; [v setButtonType:NSMomentaryPushInButton]; [sv addSubview:v]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );