diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-22 21:49:17 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-22 21:51:26 +0200 |
| commit | b8065d1e496158895352f9fc54dc5ae2419ce6a3 (patch) | |
| tree | 0ab94a242f971950cfadeb94073974521ebd45f8 | |
| parent | b1ac25006fd34515023a8421aa1968bee1339bdb (diff) | |
Allow resizing of nag dialog; may help with #1978.
| -rw-r--r-- | src/wx/nag_dialog.cc | 11 |
1 files changed, 8 insertions, 3 deletions
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 |
