more visual improvements to owner-drawn menus (patch 1143785)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-02-19 17:25:37 +00:00
parent 525165fa0a
commit 51d2fa37c4
3 changed files with 36 additions and 24 deletions

View File

@@ -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();