X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..e604288b3e4ba379b183861c1c39d3072c005f85:/src/mac/classic/bmpbuttn.cpp diff --git a/src/mac/classic/bmpbuttn.cpp b/src/mac/classic/bmpbuttn.cpp index f6ce4dd00c..b1bd49dff0 100644 --- a/src/mac/classic/bmpbuttn.cpp +++ b/src/mac/classic/bmpbuttn.cpp @@ -70,7 +70,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit MacPreControlCreate( parent , id , wxEmptyString , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , kControlBehaviorOffsetContents + ( bmap && bmap->m_bitmapType == kMacBitmapTypeIcon ? kControlContentCIconHandle : kControlContentPictHandle ) , 0, @@ -91,6 +91,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap) { m_bmpNormal = bitmap; + InvalidateBestSize(); ControlButtonContentInfo info ; wxMacCreateBitmapButton( &info , m_bmpNormal ) ;