Fix layout of KDM CC configuration (#793).
authorCarl Hetherington <cth@carlh.net>
Fri, 26 Feb 2016 22:38:06 +0000 (22:38 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 27 Feb 2016 00:52:22 +0000 (00:52 +0000)
src/wx/cinema_dialog.cc
src/wx/config_dialog.cc
src/wx/editable_list.h

index e3dff8a488278a6a3bcd23dfe3b35c7a82dee2c1..183e3b1b263daf709e1b03d9f545bb09de6b6cea 100644 (file)
@@ -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));
index 696f7a65fc9beceefa29c7d33962fa43c37d81d7..de0ac8176af488e1ac648a1959c624ae93ebaa0b 100644 (file)
@@ -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));
index 1f0ead3cdf09b749c4385e843406f387a03dbf71..47eb254e97f779c11f6538f2d9906cd6760ebc76 100644 (file)
@@ -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