diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 83d1e246e..2542c04c6 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -813,24 +813,24 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl wxCollapsiblePane *collpane = new wxCollapsiblePane(parent, wxID_ANY, "Print settings:"); collpane->Bind(wxEVT_COLLAPSIBLEPANE_CHANGED, ([parent, collpane](wxCommandEvent e){ wxWindowUpdateLocker noUpdates(parent); - parent->Layout(); collpane->Refresh(); })); // add the pane with a zero proportion value to the sizer which contains it - sizer->Add(collpane, 0, wxGROW | wxALL, 5); - // now add a test label in the collapsible pane using a sizer to layout it: + sizer->Add(collpane, 0, wxGROW | wxALL, 0); + wxWindow *win = collpane->GetPane(); #ifdef __WXMSW__ - collpane->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - win->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + wxColour& clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + collpane->GetControlWidget()->SetWindowStyleFlag(wxNO_BORDER); + collpane->GetControlWidget()->SetBackgroundColour(clr); + collpane->SetBackgroundColour(clr); + win->SetBackgroundColour(clr); #endif //__WXMSW__ DynamicPrintConfig* config = &g_PresetBundle->prints.get_edited_preset().config; - m_optgroup = std::make_shared(/*parent*/win, "", config); -// const wxArrayInt& ar = preset_sizer->GetColWidths(); -// m_optgroup->label_width = ar.IsEmpty() ? 100 : ar.front(); // doesn't work + m_optgroup = std::make_shared(win, "", config); m_optgroup->m_on_change = [config](t_config_option_key opt_key, boost::any value){ TabPrint* tab_print = nullptr; for (size_t i = 0; i < g_wxTabPanel->GetPageCount(); ++i) { @@ -943,10 +943,6 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl m_optgroup->append_line(line); - -// sizer->Add(m_optgroup->sizer, 1, wxEXPAND | wxBOTTOM, 2); - - wxSizer *paneSz = new wxBoxSizer(wxVERTICAL); paneSz->Add(m_optgroup->sizer, 1, wxGROW | wxEXPAND | wxBOTTOM, 2); win->SetSizer(paneSz);