X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4825ef73a5f190b8f39c59df098c3f39fa4464b..9b66a1d31a32e9235792261db6ff755ce26ab5c1:/src/osx/cocoa/bmpbuttn.mm diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index 0c1f471a3e..ab3433bd7f 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -33,8 +33,20 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; + + // trying to get as close as possible to flags + if ( style & wxBORDER_NONE ) + { + [v setBezelStyle:NSShadowlessSquareBezelStyle]; + } + else + { + if ( style & wxBU_AUTODRAW ) + [v setBezelStyle:NSShadowlessSquareBezelStyle]; + else + [v setBezelStyle:NSRegularSquareBezelStyle]; + } - [v setBezelStyle:NSRegularSquareBezelStyle]; [v setImage:bitmap.GetNSImage() ]; [v setButtonType:NSMomentaryPushInButton]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );