// 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
/////////////////////////////////////////////////////////////////////////////
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;