Expand vertical size of servers list in preferences (#913).
authorCarl Hetherington <cth@carlh.net>
Mon, 25 Jul 2016 23:53:17 +0000 (00:53 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 25 Jul 2016 23:53:17 +0000 (00:53 +0100)
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...

ChangeLog
src/wx/editable_list.h

index 0bfc1a32872a30461d0453e12fa4904d981ee88c..a099425f620e0c12a63f32f14b2d07c9626d0c41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-07-26  Carl Hetherington  <cth@carlh.net>
+
+       * Expand vertical size of servers list in preferences (#913).
+
 2016-07-22  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.9.5 released.
index 4b203c0e2a4c802a75d5ac9cf580fde5fcbefce6..8226c9cac813e5eefb2eca1a88370e417d3ad0ac 100644 (file)
@@ -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<void ()> SelectionChanged;
@@ -238,7 +234,7 @@ private:
        wxButton* _edit;
        wxButton* _remove;
        wxListCtrl* _list;
-       wxFlexGridSizer* _table;
+       wxBoxSizer* _sizer;
 };
 
 #endif