X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2352862a7ee8440fdc2ae65baff31b73e40179d5..e490b0d23bb7043885a59c681c437a0ec3127066:/src/osx/bmpbuttn_osx.cpp diff --git a/src/osx/bmpbuttn_osx.cpp b/src/osx/bmpbuttn_osx.cpp index f4c76447f4..c79f4fd47c 100644 --- a/src/osx/bmpbuttn_osx.cpp +++ b/src/osx/bmpbuttn_osx.cpp @@ -37,7 +37,8 @@ bool wxBitmapButton::Create( wxWindow *parent, { m_macIsUserPane = false; - if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) + if ( !wxControl::Create( parent, id, pos, size, style | wxBU_NOTEXT, + validator, name ) ) return false; if ( style & wxBU_AUTODRAW ) @@ -60,11 +61,15 @@ bool wxBitmapButton::Create( wxWindow *parent, return true; } -void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) +void wxBitmapButton::DoSetBitmap(const wxBitmap& bitmap, State which) { - InvalidateBestSize(); + wxBitmapButtonBase::DoSetBitmap(bitmap, which); - m_peer->SetBitmap( bitmap ); + // we don't support any other states currently + if ( which == State_Normal ) + { + m_peer->SetBitmap( bitmap ); + } } wxSize wxBitmapButton::DoGetBestSize() const