Fix wxBitmapButton best size calculation in wxOSX/Carbon.
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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user