diff --git a/include/wx/mac/private.h b/include/wx/mac/private.h index f34b32ea62..341d5307c7 100644 --- a/include/wx/mac/private.h +++ b/include/wx/mac/private.h @@ -129,7 +129,7 @@ PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ; CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ; void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ; CTabHandle wxMacCreateColorTable( int numColors ) ; -void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , bool forceColorIcon = false ) ; +void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ; #define MAC_WXCOLORREF(a) (*((RGBColor*)&(a))) #define MAC_WXHBITMAP(a) (GWorldPtr(a)) diff --git a/src/mac/bitmap.cpp b/src/mac/bitmap.cpp index 08590d1006..be0b45bafb 100644 --- a/src/mac/bitmap.cpp +++ b/src/mac/bitmap.cpp @@ -293,7 +293,7 @@ PicHandle wxMacCreatePict(GWorldPtr wp, GWorldPtr mask) return pict; } -void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , bool forceColorIcon ) +void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType ) { memset( info , 0 , sizeof(ControlButtonContentInfo) ) ; if ( bitmap.Ok() ) @@ -309,7 +309,7 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi } else if ( bmap->m_bitmapType == kMacBitmapTypeGrafWorld ) { - if ( (forceColorIcon || bmap->m_width == bmap->m_height) && ((bmap->m_width & 0x3) == 0) ) + if ( (forceType == kControlContentCIconHandle || ( bmap->m_width == bmap->m_height && forceType != kControlContentPictHandle ) ) && ((bmap->m_width & 0x3) == 0) ) { info->contentType = kControlContentCIconHandle ; if ( bitmap.GetMask() ) diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 08590d1006..be0b45bafb 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -293,7 +293,7 @@ PicHandle wxMacCreatePict(GWorldPtr wp, GWorldPtr mask) return pict; } -void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , bool forceColorIcon ) +void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType ) { memset( info , 0 , sizeof(ControlButtonContentInfo) ) ; if ( bitmap.Ok() ) @@ -309,7 +309,7 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi } else if ( bmap->m_bitmapType == kMacBitmapTypeGrafWorld ) { - if ( (forceColorIcon || bmap->m_width == bmap->m_height) && ((bmap->m_width & 0x3) == 0) ) + if ( (forceType == kControlContentCIconHandle || ( bmap->m_width == bmap->m_height && forceType != kControlContentPictHandle ) ) && ((bmap->m_width & 0x3) == 0) ) { info->contentType = kControlContentCIconHandle ; if ( bitmap.GetMask() )