X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/271fa2508353d08b32d9204a94b0016edb9bf84e..1b14227e64cb91284cb47319824063bb37fda104:/src/msw/menuitem.cpp?ds=sidebyside diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index e4a9d1beb9..f60a9e14d7 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -162,13 +162,13 @@ void wxMenuItem::Init() m_isRadioGroupStart = false; #if wxUSE_OWNER_DRAWN - // set default menu colors - #define SYS_COLOR(c) (wxSystemSettings::GetColour(wxSYS_COLOUR_##c)) - SetTextColour(SYS_COLOR(MENUTEXT)); - SetBackgroundColour(SYS_COLOR(MENU)); - - #undef SYS_COLOR + // when the color is not valid, wxOwnerDraw takes the default ones. + // If we set the colors here and they are changed by the user during + // the execution, then the colors are not updated until the application + // is restarted and our menus look bad + SetTextColour(wxNullColour); + SetBackgroundColour(wxNullColour); // setting default colors switched ownerdraw on: switch it off again ResetOwnerDrawn();