Button's border and background aren't use on MSW.
This commit is contained in:
parent
6abfee65ce
commit
993294579d
1 changed files with 8 additions and 12 deletions
|
@ -813,24 +813,24 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
|
||||||
wxCollapsiblePane *collpane = new wxCollapsiblePane(parent, wxID_ANY, "Print settings:");
|
wxCollapsiblePane *collpane = new wxCollapsiblePane(parent, wxID_ANY, "Print settings:");
|
||||||
collpane->Bind(wxEVT_COLLAPSIBLEPANE_CHANGED, ([parent, collpane](wxCommandEvent e){
|
collpane->Bind(wxEVT_COLLAPSIBLEPANE_CHANGED, ([parent, collpane](wxCommandEvent e){
|
||||||
wxWindowUpdateLocker noUpdates(parent);
|
wxWindowUpdateLocker noUpdates(parent);
|
||||||
|
|
||||||
parent->Layout();
|
parent->Layout();
|
||||||
collpane->Refresh();
|
collpane->Refresh();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// add the pane with a zero proportion value to the sizer which contains it
|
// add the pane with a zero proportion value to the sizer which contains it
|
||||||
sizer->Add(collpane, 0, wxGROW | wxALL, 5);
|
sizer->Add(collpane, 0, wxGROW | wxALL, 0);
|
||||||
// now add a test label in the collapsible pane using a sizer to layout it:
|
|
||||||
wxWindow *win = collpane->GetPane();
|
wxWindow *win = collpane->GetPane();
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
collpane->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
wxColour& clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
||||||
win->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
collpane->GetControlWidget()->SetWindowStyleFlag(wxNO_BORDER);
|
||||||
|
collpane->GetControlWidget()->SetBackgroundColour(clr);
|
||||||
|
collpane->SetBackgroundColour(clr);
|
||||||
|
win->SetBackgroundColour(clr);
|
||||||
#endif //__WXMSW__
|
#endif //__WXMSW__
|
||||||
|
|
||||||
DynamicPrintConfig* config = &g_PresetBundle->prints.get_edited_preset().config;
|
DynamicPrintConfig* config = &g_PresetBundle->prints.get_edited_preset().config;
|
||||||
m_optgroup = std::make_shared<ConfigOptionsGroup>(/*parent*/win, "", config);
|
m_optgroup = std::make_shared<ConfigOptionsGroup>(win, "", config);
|
||||||
// const wxArrayInt& ar = preset_sizer->GetColWidths();
|
|
||||||
// m_optgroup->label_width = ar.IsEmpty() ? 100 : ar.front(); // doesn't work
|
|
||||||
m_optgroup->m_on_change = [config](t_config_option_key opt_key, boost::any value){
|
m_optgroup->m_on_change = [config](t_config_option_key opt_key, boost::any value){
|
||||||
TabPrint* tab_print = nullptr;
|
TabPrint* tab_print = nullptr;
|
||||||
for (size_t i = 0; i < g_wxTabPanel->GetPageCount(); ++i) {
|
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);
|
m_optgroup->append_line(line);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// sizer->Add(m_optgroup->sizer, 1, wxEXPAND | wxBOTTOM, 2);
|
|
||||||
|
|
||||||
|
|
||||||
wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
|
wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
|
||||||
paneSz->Add(m_optgroup->sizer, 1, wxGROW | wxEXPAND | wxBOTTOM, 2);
|
paneSz->Add(m_optgroup->sizer, 1, wxGROW | wxEXPAND | wxBOTTOM, 2);
|
||||||
win->SetSizer(paneSz);
|
win->SetSizer(paneSz);
|
||||||
|
|
Loading…
Reference in a new issue