FIX: the line wrapping of MessageDialog is incorrect

jira: none
Change-Id: I0e821d4acbcb35ab4920a5e5b98180afa54eb7e0
(cherry picked from commit 470657fed16d2288a3ca4c2ae50d61184bb464c8)
This commit is contained in:
zhimin.zeng
2025-02-18 15:12:28 +08:00
committed by Noisyfox
parent 889911d69a
commit 2936d37067

View File

@@ -290,10 +290,13 @@ static void add_msg_content(wxWindow *parent,
page_size = wxSize(68 * em, page_height);
}
else {
Label* wrapped_text = new Label(html, msg);
wrapped_text->Wrap(68 * em);
msg = wrapped_text->GetLabel();
wrapped_text->Destroy();
// Extra line breaks in message dialog
//#ifdef __WINDOWS__
// Label* wrapped_text = new Label(html, msg);
// wrapped_text->Wrap(68 * em);
// msg = wrapped_text->GetLabel();
// wrapped_text->Destroy();
//#endif //__WINDOWS__
wxClientDC dc(parent);
wxSize msg_sz = dc.GetMultiLineTextExtent(msg);