diff --git a/src/dialog_progress.cpp b/src/dialog_progress.cpp index bcf4de96d..ef9a2dcbe 100644 --- a/src/dialog_progress.cpp +++ b/src/dialog_progress.cpp @@ -83,7 +83,13 @@ class DialogProgressSink final : public agi::ProgressSink { } void SetMessage(std::string const& msg) override { - Main().Async([=]{ dialog->text->SetLabelText(to_wx(msg)); }); + Main().Async([=]{ + dialog->text->SetLabelText(to_wx(msg)); + dialog->text->Wrap(dialog->GetMinWidth()); + dialog->text->CenterOnParent(); + dialog->Fit(); + dialog->Layout(); + }); } void SetProgress(int64_t cur, int64_t max) override { @@ -117,7 +123,7 @@ DialogProgress::DialogProgress(wxWindow *parent, wxString const& title_text, wxS { title = new wxStaticText(this, -1, title_text, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE | wxST_NO_AUTORESIZE); gauge = new wxGauge(this, -1, 300, wxDefaultPosition, wxSize(300,20)); - text = new wxStaticText(this, -1, message, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE | wxST_NO_AUTORESIZE); + text = new wxStaticText(this, -1, message, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE); cancel_button = new wxButton(this, wxID_CANCEL); log_output = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxSize(600, 240), wxTE_MULTILINE | wxTE_READONLY);