X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24e059c32ccf0d6bc1a46f7536fcaf52faf9f5d9..ba3b628e8f90c483a98af813f42a7a052f0113cc:/src/osx/cocoa/button.mm diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm index fa8938295d..8ed183958e 100644 --- a/src/osx/cocoa/button.mm +++ b/src/osx/cocoa/button.mm @@ -11,11 +11,12 @@ #include "wx/wxprec.h" -#include "wx/button.h" - #ifndef WX_PRECOMP +#include "wx/object.h" #endif +#include "wx/button.h" + #include "wx/osx/private.h" #if wxUSE_MARKUP @@ -95,9 +96,16 @@ public: virtual void SetBitmap(const wxBitmap& bitmap) { // switch bezel style for plain pushbuttons - if ( bitmap.IsOk() && [GetNSButton() bezelStyle] == NSRoundedBezelStyle ) - [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle ]; - + if ( bitmap.IsOk() ) + { + if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle) + [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle]; + } + else + { + [GetNSButton() setBezelStyle:NSRoundedBezelStyle]; + } + wxWidgetCocoaImpl::SetBitmap(bitmap); }