Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
This commit is contained in:
commit
8633e8f25c
@ -205,12 +205,6 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/)
|
||||
|
||||
void OG_CustomCtrl::OnPaint(wxPaintEvent&)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
#else
|
||||
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
||||
#endif // _WIN32
|
||||
|
||||
// case, when custom controll is destroyed but doesn't deleted from the evet loop
|
||||
if(!this->opt_group->custom_ctrl)
|
||||
return;
|
||||
@ -425,12 +419,6 @@ void OG_CustomCtrl::CtrlLine::msw_rescale()
|
||||
height = label_sz.y * (label_sz.GetWidth() > int(ctrl->opt_group->label_width * ctrl->m_em_unit) ? 2 : 1) + ctrl->m_v_gap;
|
||||
}
|
||||
|
||||
if (og_line.get_options().front().opt.full_width) {
|
||||
Field* field = ctrl->opt_group->get_field(og_line.get_options().front().opt_id);
|
||||
if (field->getWindow())
|
||||
field->getWindow()->SetSize(wxSize(3 * Field::def_width_wider() * ctrl->m_em_unit, -1));
|
||||
}
|
||||
|
||||
correct_items_positions();
|
||||
}
|
||||
|
||||
@ -509,7 +497,10 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord v_pos)
|
||||
option_set.front().side_widget == nullptr && og_line.get_extra_widgets().size() == 0)
|
||||
{
|
||||
if (field && field->undo_to_sys_bitmap())
|
||||
draw_act_bmps(dc, wxPoint(h_pos, v_pos), field->undo_to_sys_bitmap()->bmp(), field->undo_bitmap()->bmp(), field->blink());
|
||||
h_pos = draw_act_bmps(dc, wxPoint(h_pos, v_pos), field->undo_to_sys_bitmap()->bmp(), field->undo_bitmap()->bmp(), field->blink()) + ctrl->m_h_gap;
|
||||
// update width for full_width fields
|
||||
if (option_set.front().opt.full_width && field->getWindow())
|
||||
field->getWindow()->SetSize(ctrl->GetSize().x - h_pos, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -296,11 +296,7 @@ void OptionsGroup::activate_line(Line& line)
|
||||
const auto& option = option_set.front();
|
||||
const auto& field = build_field(option);
|
||||
|
||||
if (custom_ctrl) {
|
||||
if (is_window_field(field) && option.opt.full_width)
|
||||
field->getWindow()->SetSize(wxSize(3 * Field::def_width_wider() * wxGetApp().em_unit(), -1));
|
||||
}
|
||||
else {
|
||||
if (!custom_ctrl) {
|
||||
if (is_window_field(field))
|
||||
sizer->Add(field->getWindow(), option.opt.full_width ? 1 : 0,
|
||||
wxBOTTOM | wxTOP | (option.opt.full_width ? wxEXPAND : wxALIGN_CENTER_VERTICAL), (wxOSX || !staticbox) ? 0 : 2);
|
||||
|
Loading…
Reference in New Issue
Block a user