X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftemplates_dialog.cc;h=3336277b6051da1ce1f447e36c063cf36ddaebd3;hb=13fae8b9710e1f630fafdc62ecd06c723edf7ff0;hp=259989d4761e945d74106f550f0ae04c47b62b4e;hpb=39fb8198febde1937019db1c300ec363aab5aa56;p=dcpomatic.git diff --git a/src/wx/templates_dialog.cc b/src/wx/templates_dialog.cc index 259989d47..3336277b6 100644 --- a/src/wx/templates_dialog.cc +++ b/src/wx/templates_dialog.cc @@ -19,12 +19,15 @@ */ +#include "dcpomatic_button.h" +#include "rename_template_dialog.h" #include "templates_dialog.h" #include "wx_util.h" -#include "rename_template_dialog.h" -#include "dcpomatic_button.h" #include "lib/config.h" +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS using std::string; @@ -41,7 +44,7 @@ TemplatesDialog::TemplatesDialog (wxWindow* parent) SetSizer (_sizer); auto hs = new wxBoxSizer (wxHORIZONTAL); - _list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize (200, 100), wxLC_REPORT | wxLC_SINGLE_SEL); + _list = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(400, 300), wxLC_REPORT | wxLC_SINGLE_SEL); wxListItem ip; ip.SetId (0); @@ -54,9 +57,9 @@ TemplatesDialog::TemplatesDialog (wxWindow* parent) { auto s = new wxBoxSizer (wxVERTICAL); _rename = new Button (this, _("Rename...")); - s->Add (_rename, 0, wxTOP | wxBOTTOM, 2); + s->Add(_rename, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); _remove = new Button (this, _("Remove")); - s->Add (_remove, 0, wxTOP | wxBOTTOM, 2); + s->Add(_remove, 0, wxTOP | wxBOTTOM | wxEXPAND, 2); hs->Add (s, 0, wxLEFT, DCPOMATIC_SIZER_X_GAP); } @@ -75,6 +78,8 @@ TemplatesDialog::TemplatesDialog (wxWindow* parent) _list->Bind (wxEVT_SIZE, bind(&TemplatesDialog::resized, this, _1)); _config_connection = Config::instance()->Changed.connect (bind(&TemplatesDialog::refresh, this)); + Fit(); + refresh (); selection_changed (); }