Use kControlContentIconRef for toolbar bitmap buttons. Fixes bug #1826474
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -480,7 +480,7 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
|
|||||||
dc.DrawBitmap( m_bmpNormal, 0, 0, true );
|
dc.DrawBitmap( m_bmpNormal, 0, 0, true );
|
||||||
dc.SelectObject( wxNullBitmap );
|
dc.SelectObject( wxNullBitmap );
|
||||||
ControlButtonContentInfo info;
|
ControlButtonContentInfo info;
|
||||||
wxMacCreateBitmapButton( &info, bmp );
|
wxMacCreateBitmapButton( &info, bmp, kControlContentIconRef);
|
||||||
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
|
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
if (m_toolbarItemRef != NULL)
|
if (m_toolbarItemRef != NULL)
|
||||||
@@ -496,7 +496,7 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ControlButtonContentInfo info;
|
ControlButtonContentInfo info;
|
||||||
wxMacCreateBitmapButton( &info, m_bmpNormal );
|
wxMacCreateBitmapButton( &info, m_bmpNormal, kControlContentIconRef );
|
||||||
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
|
SetControlData( m_controlHandle, 0, kControlIconContentTag, sizeof(info), (Ptr)&info );
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||||
if (m_toolbarItemRef != NULL)
|
if (m_toolbarItemRef != NULL)
|
||||||
@@ -1509,7 +1509,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
{
|
{
|
||||||
wxASSERT( tool->GetControlHandle() == NULL );
|
wxASSERT( tool->GetControlHandle() == NULL );
|
||||||
ControlButtonContentInfo info;
|
ControlButtonContentInfo info;
|
||||||
wxMacCreateBitmapButton( &info, tool->GetNormalBitmap() );
|
wxMacCreateBitmapButton( &info, tool->GetNormalBitmap(), kControlContentIconRef );
|
||||||
|
|
||||||
if ( UMAGetSystemVersion() >= 0x1000 )
|
if ( UMAGetSystemVersion() >= 0x1000 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user