diff --git a/src/slic3r/GUI/GUI_ObjectLayers.cpp b/src/slic3r/GUI/GUI_ObjectLayers.cpp index 0d2033646b7..135e109a6ad 100644 --- a/src/slic3r/GUI/GUI_ObjectLayers.cpp +++ b/src/slic3r/GUI/GUI_ObjectLayers.cpp @@ -22,8 +22,10 @@ namespace GUI ObjectLayers::ObjectLayers(wxWindow* parent) : OG_Settings(parent, true) { - m_grid_sizer = new wxFlexGridSizer(3, 0, wxGetApp().em_unit()); // "Min Z", "Max Z", "Layer height" & buttons sizer + m_grid_sizer = new wxFlexGridSizer(5, 0, wxGetApp().em_unit()); // Title, Min Z, "to", Max Z, unit & buttons sizer m_grid_sizer->SetFlexibleDirection(wxHORIZONTAL); + m_grid_sizer->AddGrowableCol(1); + m_grid_sizer->AddGrowableCol(3); m_og->activate(); m_og->sizer->Clear(true); @@ -75,7 +77,7 @@ wxSizer* ObjectLayers::create_layer(const t_layer_height_range& range, PlusMinus auto head_text = new wxStaticText(m_parent, wxID_ANY, _L("Height Range"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END); head_text->SetBackgroundStyle(wxBG_STYLE_PAINT); head_text->SetFont(wxGetApp().normal_font()); - m_grid_sizer->Add(head_text, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, wxGetApp().em_unit()); + m_grid_sizer->Add(head_text, 0, wxALIGN_CENTER_VERTICAL); // Add control for the "Min Z" @@ -101,14 +103,12 @@ wxSizer* ObjectLayers::create_layer(const t_layer_height_range& range, PlusMinus select_editor(editor, is_last_edited_range); - auto sizer1 = new wxBoxSizer(wxHORIZONTAL); - sizer1->Add(editor); + m_grid_sizer->Add(editor, 1, wxEXPAND); + auto middle_text = new wxStaticText(m_parent, wxID_ANY, _L("to"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END); middle_text->SetBackgroundStyle(wxBG_STYLE_PAINT); middle_text->SetFont(wxGetApp().normal_font()); - sizer1->Add(middle_text, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, wxGetApp().em_unit()); - - m_grid_sizer->Add(sizer1); + m_grid_sizer->Add(middle_text, 0, wxALIGN_CENTER_VERTICAL); // Add control for the "Max Z" @@ -132,13 +132,13 @@ wxSizer* ObjectLayers::create_layer(const t_layer_height_range& range, PlusMinus }); //select_editor(editor, is_last_edited_range); + m_grid_sizer->Add(editor, 1, wxEXPAND); auto sizer2 = new wxBoxSizer(wxHORIZONTAL); - sizer2->Add(editor); auto unit_text = new wxStaticText(m_parent, wxID_ANY, _L("mm"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END); unit_text->SetBackgroundStyle(wxBG_STYLE_PAINT); unit_text->SetFont(wxGetApp().normal_font()); - sizer2->Add(unit_text, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, wxGetApp().em_unit()); + sizer2->Add(unit_text, 0, wxALIGN_CENTER_VERTICAL); m_grid_sizer->Add(sizer2); @@ -335,7 +335,7 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent, m_type(type), m_set_focus_data(set_focus_data_fn), wxTextCtrl(parent->m_parent, wxID_ANY, value, wxDefaultPosition, - wxSize(8 * em_unit(parent->m_parent), wxDefaultCoord), wxTE_PROCESS_ENTER + wxSize(em_unit(parent->m_parent), wxDefaultCoord), wxTE_PROCESS_ENTER #ifdef _WIN32 | wxBORDER_SIMPLE #endif @@ -444,7 +444,7 @@ coordf_t LayerRangeEditor::get_value() void LayerRangeEditor::msw_rescale() { - SetMinSize(wxSize(8 * wxGetApp().em_unit(), wxDefaultCoord)); + SetMinSize(wxSize(wxGetApp().em_unit(), wxDefaultCoord)); } } //namespace GUI