mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
parent
565732a027
commit
2fc5a7d01e
1 changed files with 11 additions and 11 deletions
|
@ -22,8 +22,10 @@ namespace GUI
|
||||||
ObjectLayers::ObjectLayers(wxWindow* parent) :
|
ObjectLayers::ObjectLayers(wxWindow* parent) :
|
||||||
OG_Settings(parent, true)
|
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->SetFlexibleDirection(wxHORIZONTAL);
|
||||||
|
m_grid_sizer->AddGrowableCol(1);
|
||||||
|
m_grid_sizer->AddGrowableCol(3);
|
||||||
|
|
||||||
m_og->activate();
|
m_og->activate();
|
||||||
m_og->sizer->Clear(true);
|
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);
|
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->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
head_text->SetFont(wxGetApp().normal_font());
|
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"
|
// 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);
|
select_editor(editor, is_last_edited_range);
|
||||||
|
|
||||||
auto sizer1 = new wxBoxSizer(wxHORIZONTAL);
|
m_grid_sizer->Add(editor, 1, wxEXPAND);
|
||||||
sizer1->Add(editor);
|
|
||||||
auto middle_text = new wxStaticText(m_parent, wxID_ANY, _L("to"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END);
|
auto middle_text = new wxStaticText(m_parent, wxID_ANY, _L("to"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END);
|
||||||
middle_text->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
middle_text->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
middle_text->SetFont(wxGetApp().normal_font());
|
middle_text->SetFont(wxGetApp().normal_font());
|
||||||
sizer1->Add(middle_text, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, wxGetApp().em_unit());
|
m_grid_sizer->Add(middle_text, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
|
|
||||||
m_grid_sizer->Add(sizer1);
|
|
||||||
|
|
||||||
// Add control for the "Max Z"
|
// 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);
|
//select_editor(editor, is_last_edited_range);
|
||||||
|
m_grid_sizer->Add(editor, 1, wxEXPAND);
|
||||||
|
|
||||||
auto sizer2 = new wxBoxSizer(wxHORIZONTAL);
|
auto sizer2 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizer2->Add(editor);
|
|
||||||
auto unit_text = new wxStaticText(m_parent, wxID_ANY, _L("mm"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END);
|
auto unit_text = new wxStaticText(m_parent, wxID_ANY, _L("mm"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END);
|
||||||
unit_text->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
unit_text->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
unit_text->SetFont(wxGetApp().normal_font());
|
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);
|
m_grid_sizer->Add(sizer2);
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent,
|
||||||
m_type(type),
|
m_type(type),
|
||||||
m_set_focus_data(set_focus_data_fn),
|
m_set_focus_data(set_focus_data_fn),
|
||||||
wxTextCtrl(parent->m_parent, wxID_ANY, value, wxDefaultPosition,
|
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
|
#ifdef _WIN32
|
||||||
| wxBORDER_SIMPLE
|
| wxBORDER_SIMPLE
|
||||||
#endif
|
#endif
|
||||||
|
@ -444,7 +444,7 @@ coordf_t LayerRangeEditor::get_value()
|
||||||
|
|
||||||
void LayerRangeEditor::msw_rescale()
|
void LayerRangeEditor::msw_rescale()
|
||||||
{
|
{
|
||||||
SetMinSize(wxSize(8 * wxGetApp().em_unit(), wxDefaultCoord));
|
SetMinSize(wxSize(wxGetApp().em_unit(), wxDefaultCoord));
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace GUI
|
} //namespace GUI
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue