diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-02-26 22:38:06 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-02-27 00:52:22 +0000 |
| commit | a9141d94e3313cc3e39f0ade703e564840689c4f (patch) | |
| tree | 47c833b155ce797eb7a80f8a60bf50fef18b56b6 | |
| parent | 71e6e81dc732f262ed7ce7011f1729bcd3e03dd2 (diff) | |
Fix layout of KDM CC configuration (#793).
| -rw-r--r-- | src/wx/cinema_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/config_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/editable_list.h | 16 |
3 files changed, 14 insertions, 6 deletions
diff --git a/src/wx/cinema_dialog.cc b/src/wx/cinema_dialog.cc index e3dff8a48..183e3b1b2 100644 --- a/src/wx/cinema_dialog.cc +++ b/src/wx/cinema_dialog.cc @@ -49,7 +49,7 @@ CinemaDialog::CinemaDialog (wxWindow* parent, string title, string name, list<st sizer->Add (_name, wxGBPosition (r, 1)); ++r; - add_label_to_sizer (sizer, this, _("Email addresses for KDM delivery"), true, wxGBPosition (r, 0), wxGBSpan (1, 2)); + add_label_to_sizer (sizer, this, _("Email addresses for KDM delivery"), false, wxGBPosition (r, 0), wxGBSpan (1, 2)); ++r; copy (emails.begin(), emails.end(), back_inserter (_emails)); diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 696f7a65f..de0ac8176 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -1239,6 +1239,8 @@ private: _reset_kdm_email = new wxButton (_panel, wxID_ANY, _("Reset to default subject and text")); _panel->GetSizer()->Add (_reset_kdm_email, 0, wxEXPAND | wxALL, _border); + _kdm_cc->layout (); + _mail_server->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&KDMEmailPage::mail_server_changed, this)); _mail_port->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&KDMEmailPage::mail_port_changed, this)); _mail_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&KDMEmailPage::mail_user_changed, this)); diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h index 1f0ead3cd..47eb254e9 100644 --- a/src/wx/editable_list.h +++ b/src/wx/editable_list.h @@ -52,9 +52,9 @@ public: wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); SetSizer (s); - wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); - table->AddGrowableCol (0, 1); - s->Add (table, 1, wxEXPAND); + _table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + _table->AddGrowableCol (0, 1); + s->Add (_table, 1, wxEXPAND); long style = wxLC_REPORT | wxLC_SINGLE_SEL; if (title) { @@ -70,7 +70,7 @@ public: _list->InsertColumn (i, ip); } - table->Add (_list, 1, wxEXPAND | wxALL); + _table->Add (_list, 1, wxEXPAND | wxALL); { wxSizer* s = new wxBoxSizer (wxVERTICAL); @@ -82,7 +82,7 @@ public: } _remove = new wxButton (this, wxID_ANY, _("Remove")); s->Add (_remove, 0, wxTOP | wxBOTTOM, 2); - table->Add (s, 0); + _table->Add (s, 0); } _add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&EditableList::add_clicked, this)); @@ -121,6 +121,11 @@ public: return all[item]; } + void layout () + { + _table->Layout (); + } + boost::signals2::signal<void ()> SelectionChanged; private: @@ -219,6 +224,7 @@ private: wxButton* _edit; wxButton* _remove; wxListCtrl* _list; + wxFlexGridSizer* _table; }; #endif |
