mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
FIX: message dialog line wrap issue
Jira: STUDIO-4553 Change-Id: I89a69488803d493b12a7a1b94b9afa7c60429186
This commit is contained in:
parent
110079f77e
commit
638a961e32
1 changed files with 7 additions and 2 deletions
|
@ -298,10 +298,15 @@ static void add_msg_content(wxWindow* parent, wxBoxSizer* content_sizer, wxStrin
|
|||
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();
|
||||
wxClientDC dc(parent);
|
||||
wxSize msg_sz = dc.GetMultiLineTextExtent(msg);
|
||||
page_size = wxSize(std::min(msg_sz.GetX() + 2 * em, 68 * em),
|
||||
std::min(msg_sz.GetY() + 2 * em, 68 * em));
|
||||
|
||||
page_size = wxSize(std::min(msg_sz.GetX(), 68 * em),
|
||||
std::min(msg_sz.GetY(), 68 * em));
|
||||
}
|
||||
html->SetMinSize(page_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue