Button 'Load shape from STL' centered into its panel in bed shape dialog

This commit is contained in:
Enrico Turri 2019-07-03 08:58:05 +02:00
parent 2a71665de9
commit d101ed709c

View File

@ -92,12 +92,14 @@ void BedShapePanel::build_panel(ConfigOptionPoints* default_pt)
Line line{ "", "" }; Line line{ "", "" };
line.full_width = 1; line.full_width = 1;
line.widget = [this](wxWindow* parent) { line.widget = [this](wxWindow* parent) {
auto btn = new wxButton(parent, wxID_ANY, _(L("Load shape from STL...")), wxDefaultPosition, wxDefaultSize); auto shape_btn = new wxButton(parent, wxID_ANY, _(L("Load shape from STL...")));
wxSizer* shape_sizer = new wxBoxSizer(wxHORIZONTAL);
shape_sizer->Add(shape_btn, 1, wxEXPAND);
auto sizer = new wxBoxSizer(wxHORIZONTAL); wxSizer* sizer = new wxBoxSizer(wxVERTICAL);
sizer->Add(btn); sizer->Add(shape_sizer, 1, wxEXPAND);
btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e) shape_btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent& e)
{ {
load_stl(); load_stl();
})); }));