X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9add93670bb4a38e4007b8422b34b29b6194eecb..6341d8249f2952b8e19ddd208a42074eeed1f4dd:/src/univ/menu.cpp diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index bce164c644..0ebba81d19 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -585,6 +585,21 @@ void wxPopupMenuWindow::DoDraw(wxControlRenderer *renderer) if ( item == GetCurrentItem() ) flags |= wxCONTROL_SELECTED; + wxBitmap bmp; + + if ( !item->IsEnabled() ) + { + bmp = item->GetDisabledBitmap(); + } + + if ( !bmp.Ok() ) + { + // strangely enough, for unchecked item we use the + // "checked" bitmap because this is the default one - this + // explains this strange boolean expression + bmp = item->GetBitmap(!item->IsCheckable() || item->IsChecked()); + } + rend->DrawMenuItem ( dc, @@ -592,10 +607,7 @@ void wxPopupMenuWindow::DoDraw(wxControlRenderer *renderer) gi, item->GetLabel(), item->GetAccelString(), - // strangely enough, for unchecked item we use the - // "checked" bitmap because this is the default one - this - // explains this strange boolean expression - item->GetBitmap(!item->IsCheckable() || item->IsChecked()), + bmp, flags, item->GetAccelIndex() ); @@ -1487,6 +1499,8 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, m_radioGroup.start = -1; m_isRadioGroupStart = FALSE; + m_bmpDisabled = wxNullBitmap; + UpdateAccelInfo(); }