only change the bitmap size for the borderless controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-12 01:51:39 +00:00
parent 369be443aa
commit d24a9fc768

View File

@@ -55,12 +55,12 @@ bool wxBitmapButton::Create( wxWindow *parent,
Rect bounds = wxMacGetBoundsForControl( this, pos, size ); Rect bounds = wxMacGetBoundsForControl( this, pos, size );
m_peer = new wxMacControl( this ); m_peer = new wxMacControl( this );
if ( bitmap.Ok() && !size.IsFullySpecified() ) if ( bitmap.Ok() && HasFlag(wxBORDER_NONE) )
{ {
// in Mac OS X the bitmap buttons can have only one of the few standard // in Mac OS X the icon controls (which are used for borderless bitmap
// sizes and if they don't, the OS rescales them automatically // buttons) can have only one of the few standard sizes and if they
// resulting in really ugly images, so centre the image in a square of // don't, the OS rescales them automatically resulting in really ugly
// standard size instead // images, so centre the image in a square of standard size instead
// the supported sizes, sorted in decreasng order // the supported sizes, sorted in decreasng order
static const int stdSizes[] = { 128, 48, 32, 16, 0 }; static const int stdSizes[] = { 128, 48, 32, 16, 0 };