X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fde5da316a65ade864f9e65764a57c2ef3b674bb..8064223b7b1b3657363b7a635c381b9269d95e55:/src/mac/carbon/bmpbuttn.cpp diff --git a/src/mac/carbon/bmpbuttn.cpp b/src/mac/carbon/bmpbuttn.cpp index 0d9e2d3956..aae979a862 100644 --- a/src/mac/carbon/bmpbuttn.cpp +++ b/src/mac/carbon/bmpbuttn.cpp @@ -118,16 +118,15 @@ bool wxBitmapButton::Create( wxWindow *parent, m_bmpNormal = bitmap; -#ifdef __WXMAC_OSX__ if ( HasFlag( wxBORDER_NONE ) ) { + // contrary to the docs this control only works with iconrefs wxMacCreateBitmapButton( &info, m_bmpNormal, kControlContentIconRef ); err = CreateIconControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, &info, false, m_peer->GetControlRefAddr() ); } else -#endif { wxMacCreateBitmapButton( &info, m_bmpNormal ); err = CreateBevelButtonControl( @@ -157,7 +156,6 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) ControlButtonContentInfo info; -#ifdef __WXMAC_OSX__ if ( HasFlag( wxBORDER_NONE ) ) { wxMacCreateBitmapButton( &info, m_bmpNormal, kControlContentIconRef ); @@ -165,7 +163,6 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) m_peer->SetData( kControlIconPart, kControlIconContentTag, info ); } else -#endif { wxMacCreateBitmapButton( &info, m_bmpNormal ); if ( info.contentType != kControlNoContent )