Fixed bed shape dialog layout
This commit is contained in:
parent
7a7316fcbf
commit
2c0f0c85a5
1 changed files with 7 additions and 11 deletions
|
@ -53,15 +53,12 @@ void BedShapeDialog::on_dpi_changed(const wxRect &suggested_rect)
|
||||||
|
|
||||||
void BedShapePanel::build_panel(ConfigOptionPoints* default_pt)
|
void BedShapePanel::build_panel(ConfigOptionPoints* default_pt)
|
||||||
{
|
{
|
||||||
// on_change(nullptr);
|
auto sbsizer = new wxStaticBoxSizer(wxVERTICAL, this, _(L("Shape")));
|
||||||
|
|
||||||
auto box = new wxStaticBox(this, wxID_ANY, _(L("Shape")));
|
|
||||||
auto sbsizer = new wxStaticBoxSizer(box, wxVERTICAL);
|
|
||||||
|
|
||||||
// shape options
|
// shape options
|
||||||
m_shape_options_book = new wxChoicebook(this, wxID_ANY, wxDefaultPosition,
|
m_shape_options_book = new wxChoicebook(this, wxID_ANY, wxDefaultPosition,
|
||||||
wxSize(25*wxGetApp().em_unit(), -1), wxCHB_TOP);
|
wxSize(25*wxGetApp().em_unit(), -1), wxCHB_TOP);
|
||||||
sbsizer->Add(m_shape_options_book);
|
sbsizer->Add(m_shape_options_book);
|
||||||
|
|
||||||
auto optgroup = init_shape_options_page(_(L("Rectangular")));
|
auto optgroup = init_shape_options_page(_(L("Rectangular")));
|
||||||
ConfigOptionDef def;
|
ConfigOptionDef def;
|
||||||
|
@ -108,8 +105,8 @@ void BedShapePanel::build_panel(ConfigOptionPoints* default_pt)
|
||||||
};
|
};
|
||||||
optgroup->append_line(line);
|
optgroup->append_line(line);
|
||||||
|
|
||||||
Bind(wxEVT_CHOICEBOOK_PAGE_CHANGED, ([this](wxCommandEvent e)
|
Bind(wxEVT_CHOICEBOOK_PAGE_CHANGED, ([this](wxCommandEvent& e)
|
||||||
{
|
{
|
||||||
update_shape();
|
update_shape();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -119,8 +116,8 @@ void BedShapePanel::build_panel(ConfigOptionPoints* default_pt)
|
||||||
|
|
||||||
// main sizer
|
// main sizer
|
||||||
auto top_sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto top_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
top_sizer->Add(sbsizer, 0, wxEXPAND | wxLeft | wxTOP | wxBOTTOM, 10);
|
top_sizer->Add(sbsizer, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 10);
|
||||||
if (m_canvas)
|
if (m_canvas)
|
||||||
top_sizer->Add(m_canvas, 1, wxEXPAND | wxALL, 10) ;
|
top_sizer->Add(m_canvas, 1, wxEXPAND | wxALL, 10) ;
|
||||||
|
|
||||||
SetSizerAndFit(top_sizer);
|
SetSizerAndFit(top_sizer);
|
||||||
|
@ -137,8 +134,7 @@ void BedShapePanel::build_panel(ConfigOptionPoints* default_pt)
|
||||||
// Create a panel for a rectangular / circular / custom bed shape.
|
// Create a panel for a rectangular / circular / custom bed shape.
|
||||||
ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(const wxString& title)
|
ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(const wxString& title)
|
||||||
{
|
{
|
||||||
|
auto panel = new wxPanel(m_shape_options_book);
|
||||||
auto panel = new wxPanel(m_shape_options_book);
|
|
||||||
ConfigOptionsGroupShp optgroup;
|
ConfigOptionsGroupShp optgroup;
|
||||||
optgroup = std::make_shared<ConfigOptionsGroup>(panel, _(L("Settings")));
|
optgroup = std::make_shared<ConfigOptionsGroup>(panel, _(L("Settings")));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue