From: Carl Hetherington Date: Thu, 22 Apr 2021 19:49:17 +0000 (+0200) Subject: Allow resizing of nag dialog; may help with #1978. X-Git-Tag: v2.15.141~35 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=b8065d1e496158895352f9fc54dc5ae2419ce6a3 Allow resizing of nag dialog; may help with #1978. --- diff --git a/src/wx/nag_dialog.cc b/src/wx/nag_dialog.cc index 85f2d0110..417b5f94c 100644 --- a/src/wx/nag_dialog.cc +++ b/src/wx/nag_dialog.cc @@ -29,14 +29,14 @@ using namespace boost::placeholders; #endif NagDialog::NagDialog (wxWindow* parent, Config::Nag nag, wxString message, bool can_cancel) - : wxDialog (parent, wxID_ANY, _("Important notice")) + : wxDialog (parent, wxID_ANY, _("Important notice"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) , _nag (nag) { - wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL); + auto sizer = new wxBoxSizer (wxVERTICAL); _text = new StaticText (this, wxEmptyString, wxDefaultPosition, wxSize (400, 300)); sizer->Add (_text, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER); - wxCheckBox* b = new CheckBox (this, _("Don't show this message again")); + auto b = new CheckBox (this, _("Don't show this message again")); sizer->Add (b, 0, wxALL, 6); b->Bind (wxEVT_CHECKBOX, bind (&NagDialog::shut_up, this, _1)); @@ -54,6 +54,11 @@ NagDialog::NagDialog (wxWindow* parent, Config::Nag nag, wxString message, bool sizer->SetSizeHints (this); _text->SetLabelMarkup (message); + + Bind (wxEVT_SIZE, [this](wxSizeEvent& ev) { + Layout(); + ev.Skip(); + }); } void