Fix sizing in wxMarkupParserRenderItemOutput::OnText
Pass the text without mnemonics to GetTextExtent().
This commit is contained in:
@@ -253,8 +253,10 @@ public:
|
|||||||
m_ellipsizeMode = ellipsizeMode == wxELLIPSIZE_NONE ? wxELLIPSIZE_NONE : wxELLIPSIZE_END;
|
m_ellipsizeMode = ellipsizeMode == wxELLIPSIZE_NONE ? wxELLIPSIZE_NONE : wxELLIPSIZE_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnText(const wxString& text) wxOVERRIDE
|
virtual void OnText(const wxString& text_) wxOVERRIDE
|
||||||
{
|
{
|
||||||
|
const wxString text(wxControl::RemoveMnemonics(text_));
|
||||||
|
|
||||||
wxRect rect(m_rect);
|
wxRect rect(m_rect);
|
||||||
rect.x = m_pos;
|
rect.x = m_pos;
|
||||||
rect.SetRight(m_rect.GetRight());
|
rect.SetRight(m_rect.GetRight());
|
||||||
@@ -286,7 +288,7 @@ public:
|
|||||||
|
|
||||||
m_renderer->DrawItemText(m_win,
|
m_renderer->DrawItemText(m_win,
|
||||||
m_dc,
|
m_dc,
|
||||||
wxControl::RemoveMnemonics(text),
|
text,
|
||||||
rect,
|
rect,
|
||||||
wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL,
|
wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL,
|
||||||
m_rendererFlags,
|
m_rendererFlags,
|
||||||
|
Reference in New Issue
Block a user