X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4354db179f5b9f3107cc532bb5232deccab90d0..ec2df34e27ba41f202ecbf096cdfed082a9ddb8f:/src/osx/carbon/anybutton.cpp diff --git a/src/osx/carbon/anybutton.cpp b/src/osx/carbon/anybutton.cpp index 36a642a698..b24b73b47c 100644 --- a/src/osx/carbon/anybutton.cpp +++ b/src/osx/carbon/anybutton.cpp @@ -53,7 +53,17 @@ wxSize wxAnyButton::DoGetBestSize() const 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) ) { Point bounds;