summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-04 23:46:54 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-04 23:46:54 +0200
commite8a5de9cb15336241a8e4b116ec3d3c1b4c699e5 (patch)
tree2a9ee33297d438c6ae724ec5ce19d7b85e843c06
parent27f29ec92ba70c49960ebe61b774b020d2d82424 (diff)
Tidy up the layout of the TemplatesDialog a bit.
-rw-r--r--src/wx/templates_dialog.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wx/templates_dialog.cc b/src/wx/templates_dialog.cc
index b47c366ab..3336277b6 100644
--- a/src/wx/templates_dialog.cc
+++ b/src/wx/templates_dialog.cc
@@ -44,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);
@@ -57,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);
}
@@ -78,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 ();
}