From: Carl Hetherington Date: Mon, 25 Jul 2016 23:53:17 +0000 (+0100) Subject: Expand vertical size of servers list in preferences (#913). X-Git-Tag: v2.9.6~6 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=7d50d28d283570b0648450a2dc9448c988c39f46;hp=7dfeb9c597e2391e262ec070112af22a71542967;p=dcpomatic.git Expand vertical size of servers list in preferences (#913). Remove a rather baroque sizer arrangement with a simpler wxBoxSizer which allows EditableLists to grow. There may have been a reason for the more complicated arrangement... --- diff --git a/ChangeLog b/ChangeLog index 0bfc1a328..a099425f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-07-26 Carl Hetherington + + * Expand vertical size of servers list in preferences (#913). + 2016-07-22 Carl Hetherington * Version 2.9.5 released. diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h index 4b203c0e2..8226c9cac 100644 --- a/src/wx/editable_list.h +++ b/src/wx/editable_list.h @@ -54,12 +54,8 @@ public: , _column (column) , _edit (0) { - wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); - SetSizer (s); - - _table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); - _table->AddGrowableCol (0, 1); - s->Add (_table, 1, wxEXPAND); + _sizer = new wxBoxSizer (wxHORIZONTAL); + SetSizer (_sizer); long style = wxLC_REPORT | wxLC_SINGLE_SEL; if (title) { @@ -75,7 +71,7 @@ public: _list->InsertColumn (i, ip); } - _table->Add (_list, 1, wxEXPAND | wxALL); + _sizer->Add (_list, 1, wxEXPAND); { wxSizer* s = new wxBoxSizer (wxVERTICAL); @@ -87,7 +83,7 @@ public: } _remove = new wxButton (this, wxID_ANY, _("Remove")); s->Add (_remove, 0, wxTOP | wxBOTTOM, 2); - _table->Add (s, 0); + _sizer->Add (s, 0, wxLEFT, DCPOMATIC_SIZER_X_GAP); } _add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&EditableList::add_clicked, this)); @@ -128,7 +124,7 @@ public: void layout () { - _table->Layout (); + _sizer->Layout (); } boost::signals2::signal SelectionChanged; @@ -238,7 +234,7 @@ private: wxButton* _edit; wxButton* _remove; wxListCtrl* _list; - wxFlexGridSizer* _table; + wxBoxSizer* _sizer; }; #endif