X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fde5da316a65ade864f9e65764a57c2ef3b674bb..7f65743f005572f1de2754ba8c5e7cf1eed1847e:/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 )