X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/867e99f57d01aaf89e5b470a2db97c95a0ac621f..b2fee376fd93d8d08ad2f8fc6f42d940bfae4540:/src/mac/menu.cpp diff --git a/src/mac/menu.cpp b/src/mac/menu.cpp index 2bf327fc4c..caadf18ce3 100644 --- a/src/mac/menu.cpp +++ b/src/mac/menu.cpp @@ -209,10 +209,34 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) if ( pos == (size_t)-1 ) { UMAAppendMenuItem(MAC_WXHMENU(m_hMenu), label,key,modifiers); + if ( pItem->GetBitmap().Ok() ) + { + ControlButtonContentInfo info ; + wxMacCreateBitmapButton( &info , pItem->GetBitmap() , true ) ; + if ( info.contentType != kControlNoContent ) + { + if ( info.contentType == kControlContentCIconHandle ) + SetMenuItemIconHandle( MAC_WXHMENU(m_hMenu) , CountMenuItems(MAC_WXHMENU(m_hMenu) ) , + kMenuColorIconType , (Handle) info.u.cIconHandle ) ; + } + + } } else { UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), label , pos,key,modifiers); + if ( pItem->GetBitmap().Ok() ) + { + ControlButtonContentInfo info ; + wxMacCreateBitmapButton( &info , pItem->GetBitmap() , true ) ; + if ( info.contentType != kControlNoContent ) + { + if ( info.contentType == kControlContentCIconHandle ) + SetMenuItemIconHandle( MAC_WXHMENU(m_hMenu) , pos , + kMenuColorIconType , (Handle) info.u.cIconHandle ) ; + } + + } } if ( pItem->GetId() == idMenuTitle ) {