git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31958
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- // we don't want normal items be owner-drawn
+ // setting default colors switched ownerdraw on: switch it off again
+ // switch ownerdraw back on if using a non default margin
+ if ( GetId() != wxID_SEPARATOR )
+ SetMarginWidth(GetMarginWidth());
+
// tell the owner drawing code to to show the accel string as well
SetAccelString(m_text.AfterFirst(_T('\t')));
#endif // wxUSE_OWNER_DRAWN
// tell the owner drawing code to to show the accel string as well
SetAccelString(m_text.AfterFirst(_T('\t')));
#endif // wxUSE_OWNER_DRAWN
// menu icons and checkmarks
if (ms_nDefaultMarginWidth == 0)
{
// menu icons and checkmarks
if (ms_nDefaultMarginWidth == 0)
{
- ms_nDefaultMarginWidth = wxMSWSystemMenuFontModule::ms_systemMenuButtonWidth;
- ms_nLastMarginWidth = wxMSWSystemMenuFontModule::ms_systemMenuButtonWidth;
+ ms_nDefaultMarginWidth = ::GetSystemMetrics(SM_CXMENUCHECK) + wxSystemSettings::GetMetric(wxSYS_EDGE_X);
+ ms_nLastMarginWidth = ms_nDefaultMarginWidth;
}
if (wxMSWSystemMenuFontModule::ms_systemMenuFont->Ok() && bMenuItem)
}
if (wxMSWSystemMenuFontModule::ms_systemMenuFont->Ok() && bMenuItem)