diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-11-23 23:53:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-28 19:49:26 +0200 |
| commit | f3275bba73347eef03bbe6f7982e8ca25f2aced6 (patch) | |
| tree | 872667cdb63a4e3372b5cd5235d82c5b868fac3b /src/wx/hints_dialog.cc | |
| parent | eda4ed548e51ab1c231205ec141dac3dd6be2ac4 (diff) | |
Save window metrics in the config file (#1575).
Perhaps these should be in a separate GUI file, like how it's done for
Films, but I can't really see a big advantage (and there already
GUI-only details in there).
In this commit we also save the hints dialog size/position and
start it a bit larger (#2892).
Diffstat (limited to 'src/wx/hints_dialog.cc')
| -rw-r--r-- | src/wx/hints_dialog.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc index e02c07518..47d96a70e 100644 --- a/src/wx/hints_dialog.cc +++ b/src/wx/hints_dialog.cc @@ -46,10 +46,11 @@ using namespace boost::placeholders; HintsDialog::HintsDialog(wxWindow* parent, std::weak_ptr<Film> film, bool ok) - : wxDialog(parent, wxID_ANY, _("Hints")) + : wxDialog(parent, wxID_ANY, _("Hints"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) , _film(film) , _hints(0) , _finished(false) + , _metrics(std::string{"hints"}, { 800, 600 }, this) { auto sizer = new wxBoxSizer(wxVERTICAL); @@ -58,7 +59,7 @@ HintsDialog::HintsDialog(wxWindow* parent, std::weak_ptr<Film> film, bool ok) _gauge_message = new StaticText(this, {}); sizer->Add(_gauge_message, 0, wxALL | wxEXPAND, DCPOMATIC_SIZER_GAP); - _text = new wxRichTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(400, 300), wxRE_READONLY); + _text = new wxRichTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRE_READONLY); sizer->Add(_text, 1, wxEXPAND | wxALL, 6); if (!ok) { @@ -95,6 +96,8 @@ HintsDialog::HintsDialog(wxWindow* parent, std::weak_ptr<Film> film, bool ok) } film_change(ChangeType::DONE); + + _metrics.bind(); } @@ -189,3 +192,10 @@ HintsDialog::progress(string m) { _gauge_message->SetLabel(std_to_wx(m)); } + +void +HintsDialog::show() +{ + _metrics.show(); +} + |
