X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4354db179f5b9f3107cc532bb5232deccab90d0..71a09c3579dd5cb4cd8fa7fdc143561cbff74e12:/src/osx/carbon/anybutton.cpp?ds=sidebyside diff --git a/src/osx/carbon/anybutton.cpp b/src/osx/carbon/anybutton.cpp index 36a642a698..0788b23c84 100644 --- a/src/osx/carbon/anybutton.cpp +++ b/src/osx/carbon/anybutton.cpp @@ -3,7 +3,6 @@ // Purpose: wxAnyButton // Author: Stefan Csomor // Created: 1998-01-01 (extracted from button.cpp) -// RCS-ID: $Id: anybutton.cpp 67230 2011-03-18 14:20:12Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -53,7 +52,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;