]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menuitem.cpp
move variable definitions to more appropriate places, remove now-empty src/common...
[wxWidgets.git] / src / msw / menuitem.cpp
index 4d8ae82a8a17724e50f0b448b303e8f07dc5afe5..0c69e199bdbfb776e82089289894f4e6e40d813f 100644 (file)
@@ -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;