X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..48e05747043db02c4e9d2e286eca4fdf5dee7881:/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;