X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b146648622edeaf02a040c488766d3690dea74bd..cc3977bf132d40cb66c6b488890ef67a396d4a0a:/src/msw/menuitem.cpp?ds=sidebyside diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 4d8ae82a8a..0c69e199bd 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -959,7 +959,11 @@ bool wxMenuItem::OnDrawItem(wxDC& dc, const wxRect& rc, rcText.top--; #if wxUSE_UXTHEME - wxUxThemeEngine* theme = MenuDrawData::GetUxThemeEngine(); + // If a custom background colour is explicitly specified, we should use + // it instead of the default theme background. + wxUxThemeEngine* const theme = GetBackgroundColour().IsOk() + ? NULL + : MenuDrawData::GetUxThemeEngine(); if ( theme ) { POPUPITEMSTATES state;