X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2acac1b415376271d108659df0d15741f53f4803..a201463482dc4417592ee014ff1a9706e8971dd6:/src/mac/carbon/bmpbuttn.cpp diff --git a/src/mac/carbon/bmpbuttn.cpp b/src/mac/carbon/bmpbuttn.cpp index 2c149dd7d9..26ee9dc953 100644 --- a/src/mac/carbon/bmpbuttn.cpp +++ b/src/mac/carbon/bmpbuttn.cpp @@ -16,8 +16,7 @@ #include "wx/bmpbuttn.h" #ifndef WX_PRECOMP - #include "wx/window.h" - #include "wx/bitmap.h" + #include "wx/dcmemory.h" #endif IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) @@ -56,12 +55,12 @@ bool wxBitmapButton::Create( wxWindow *parent, Rect bounds = wxMacGetBoundsForControl( this, pos, size ); 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 - // sizes and if they don't, the OS rescales them automatically - // resulting in really ugly images, so centre the image in a square of - // standard size instead + // in Mac OS X the icon controls (which are used for borderless bitmap + // buttons) can have only one of the few standard sizes and if they + // don't, the OS rescales them automatically resulting in really ugly + // images, so centre the image in a square of standard size instead // the supported sizes, sorted in decreasng order static const int stdSizes[] = { 128, 48, 32, 16, 0 };