wxAnyButton refactoring broke the best size computation for Carbon, fix it to
work as it did before.
Closes #13830.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71298
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
GetPeer()->GetBestRect( &bestsize ) ;
int wBtn;
GetPeer()->GetBestRect( &bestsize ) ;
int wBtn;
- if ( EmptyRect( &bestsize ) || ( GetWindowStyle() & wxBU_EXACTFIT) )
+ if ( GetBitmapLabel().IsOk() )
+ {
+ sz.x = bestsize.right - bestsize.left ;
+ sz.y = bestsize.bottom - bestsize.top ;
+ sz.x = sz.x + MacGetLeftBorderSize() +
+ MacGetRightBorderSize();
+ sz.y = sz.y + MacGetTopBorderSize() +
+ MacGetBottomBorderSize();
+ wBtn = sz.x;
+ }
+ else if ( EmptyRect( &bestsize ) || ( GetWindowStyle() & wxBU_EXACTFIT) )