Fix for #8738 - UI bug: profile edit controls hidden by scroll bars.
This commit is contained in:
parent
5acbcebf20
commit
b19ae0df5b
@ -788,7 +788,9 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
|
|
||||||
p->sizer_filaments = new wxBoxSizer(wxVERTICAL);
|
p->sizer_filaments = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
auto init_combo = [this](PlaterPresetComboBox **combo, wxString label, Preset::Type preset_type, bool filament) {
|
const int margin_5 = int(0.5 * wxGetApp().em_unit());// 5;
|
||||||
|
|
||||||
|
auto init_combo = [this, margin_5](PlaterPresetComboBox **combo, wxString label, Preset::Type preset_type, bool filament) {
|
||||||
auto *text = new wxStaticText(p->presets_panel, wxID_ANY, label + " :");
|
auto *text = new wxStaticText(p->presets_panel, wxID_ANY, label + " :");
|
||||||
text->SetFont(wxGetApp().small_font());
|
text->SetFont(wxGetApp().small_font());
|
||||||
*combo = new PlaterPresetComboBox(p->presets_panel, preset_type);
|
*combo = new PlaterPresetComboBox(p->presets_panel, preset_type);
|
||||||
@ -803,9 +805,19 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
auto *sizer_filaments = this->p->sizer_filaments;
|
auto *sizer_filaments = this->p->sizer_filaments;
|
||||||
sizer_presets->Add(text, 0, wxALIGN_LEFT | wxEXPAND | wxRIGHT, 4);
|
sizer_presets->Add(text, 0, wxALIGN_LEFT | wxEXPAND | wxRIGHT, 4);
|
||||||
if (! filament) {
|
if (! filament) {
|
||||||
sizer_presets->Add(combo_and_btn_sizer, 0, wxEXPAND | wxBOTTOM, 1);
|
sizer_presets->Add(combo_and_btn_sizer, 0, wxEXPAND |
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
wxRIGHT, margin_5);
|
||||||
|
#else
|
||||||
|
wxBOTTOM, 1);
|
||||||
|
#endif // __WXGTK3__
|
||||||
} else {
|
} else {
|
||||||
sizer_filaments->Add(combo_and_btn_sizer, 0, wxEXPAND | wxBOTTOM, 1);
|
sizer_filaments->Add(combo_and_btn_sizer, 0, wxEXPAND |
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
wxRIGHT, margin_5);
|
||||||
|
#else
|
||||||
|
wxBOTTOM, 1);
|
||||||
|
#endif // __WXGTK3__
|
||||||
(*combo)->set_extruder_idx(0);
|
(*combo)->set_extruder_idx(0);
|
||||||
sizer_presets->Add(sizer_filaments, 1, wxEXPAND);
|
sizer_presets->Add(sizer_filaments, 1, wxEXPAND);
|
||||||
}
|
}
|
||||||
@ -818,13 +830,15 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
init_combo(&p->combo_sla_material, _L("SLA material"), Preset::TYPE_SLA_MATERIAL, false);
|
init_combo(&p->combo_sla_material, _L("SLA material"), Preset::TYPE_SLA_MATERIAL, false);
|
||||||
init_combo(&p->combo_printer, _L("Printer"), Preset::TYPE_PRINTER, false);
|
init_combo(&p->combo_printer, _L("Printer"), Preset::TYPE_PRINTER, false);
|
||||||
|
|
||||||
const int margin_5 = int(0.5*wxGetApp().em_unit());// 5;
|
|
||||||
|
|
||||||
p->sizer_params = new wxBoxSizer(wxVERTICAL);
|
p->sizer_params = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
// Frequently changed parameters
|
// Frequently changed parameters
|
||||||
p->frequently_changed_parameters = new FreqChangedParams(p->scrolled);
|
p->frequently_changed_parameters = new FreqChangedParams(p->scrolled);
|
||||||
p->sizer_params->Add(p->frequently_changed_parameters->get_sizer(), 0, wxEXPAND | wxTOP | wxBOTTOM, wxOSX ? 1 : margin_5);
|
p->sizer_params->Add(p->frequently_changed_parameters->get_sizer(), 0, wxEXPAND | wxTOP | wxBOTTOM
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
| wxRIGHT
|
||||||
|
#endif // __WXGTK3__
|
||||||
|
, wxOSX ? 1 : margin_5);
|
||||||
|
|
||||||
// Object List
|
// Object List
|
||||||
p->object_list = new ObjectList(p->scrolled);
|
p->object_list = new ObjectList(p->scrolled);
|
||||||
@ -852,12 +866,19 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
// Sizer in the scrolled area
|
// Sizer in the scrolled area
|
||||||
if (p->mode_sizer)
|
if (p->mode_sizer)
|
||||||
scrolled_sizer->Add(p->mode_sizer, 0, wxALIGN_CENTER_HORIZONTAL);
|
scrolled_sizer->Add(p->mode_sizer, 0, wxALIGN_CENTER_HORIZONTAL);
|
||||||
|
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
wxDirection size_margin = wxLEFT | wxRIGHT;
|
||||||
|
#else
|
||||||
|
wxDirection size_margin = wxLEFT;
|
||||||
|
#endif // __WXGTK3__
|
||||||
|
|
||||||
is_msw ?
|
is_msw ?
|
||||||
scrolled_sizer->Add(p->presets_panel, 0, wxEXPAND | wxLEFT, margin_5) :
|
scrolled_sizer->Add(p->presets_panel, 0, wxEXPAND | size_margin, margin_5) :
|
||||||
scrolled_sizer->Add(p->sizer_presets, 0, wxEXPAND | wxLEFT, margin_5);
|
scrolled_sizer->Add(p->sizer_presets, 0, wxEXPAND | size_margin, margin_5);
|
||||||
scrolled_sizer->Add(p->sizer_params, 1, wxEXPAND | wxLEFT, margin_5);
|
scrolled_sizer->Add(p->sizer_params, 1, wxEXPAND | size_margin, margin_5);
|
||||||
scrolled_sizer->Add(p->object_info, 0, wxEXPAND | wxTOP | wxLEFT, margin_5);
|
scrolled_sizer->Add(p->object_info, 0, wxEXPAND | wxTOP | size_margin, margin_5);
|
||||||
scrolled_sizer->Add(p->sliced_info, 0, wxEXPAND | wxTOP | wxLEFT, margin_5);
|
scrolled_sizer->Add(p->sliced_info, 0, wxEXPAND | wxTOP | size_margin, margin_5);
|
||||||
|
|
||||||
// Buttons underneath the scrolled area
|
// Buttons underneath the scrolled area
|
||||||
|
|
||||||
@ -975,7 +996,12 @@ void Sidebar::init_filament_combo(PlaterPresetComboBox **combo, const int extr_i
|
|||||||
int(0.3*wxGetApp().em_unit()));
|
int(0.3*wxGetApp().em_unit()));
|
||||||
|
|
||||||
auto /***/sizer_filaments = this->p->sizer_filaments;
|
auto /***/sizer_filaments = this->p->sizer_filaments;
|
||||||
sizer_filaments->Add(combo_and_btn_sizer, 1, wxEXPAND | wxBOTTOM, 1);
|
sizer_filaments->Add(combo_and_btn_sizer, 1, wxEXPAND |
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
wxRIGHT, margin_5);
|
||||||
|
#else
|
||||||
|
wxBOTTOM, 1);
|
||||||
|
#endif // __WXGTK3__
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sidebar::remove_unused_filament_combos(const size_t current_extruder_count)
|
void Sidebar::remove_unused_filament_combos(const size_t current_extruder_count)
|
||||||
|
Loading…
Reference in New Issue
Block a user