Applied [ 1059554 ] patch for [1028659] fixes a couple of bugs with menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -170,9 +170,13 @@ void wxMenuItem::Init()
|
||||
|
||||
#undef SYS_COLOR
|
||||
|
||||
// we don't want normal items be owner-drawn
|
||||
// setting default colors switched ownerdraw on: switch it off again
|
||||
ResetOwnerDrawn();
|
||||
|
||||
// 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
|
||||
|
@@ -107,8 +107,8 @@ wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
|
||||
// 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)
|
||||
|
Reference in New Issue
Block a user