added forcing for bitmap types
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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))
|
||||
|
@@ -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() )
|
||||
|
@@ -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() )
|
||||
|
Reference in New Issue
Block a user