wxWidgets: CheckResizerFlags assert fix (PR #10811)

./src/common/sizer.cpp(2258): assert "CheckSizerFlags(!((flags) & (wxALIGN_CENTRE_VERTICAL)))"
failed in DoInsert(): wxALIGN_CENTRE_VERTICAL will be ignored in this sizer:
wxEXPAND overrides alignment flags in box sizers
This commit is contained in:
Pascal de Bruijn 2023-06-14 19:56:35 +02:00 committed by Lukas Matena
parent a16d93be75
commit 29fbb1acd1
4 changed files with 5 additions and 5 deletions

View File

@ -1722,7 +1722,7 @@ void SliderCtrl::BUILD()
m_textctrl->SetFont(Slic3r::GUI::wxGetApp().normal_font());
m_textctrl->SetBackgroundStyle(wxBG_STYLE_PAINT);
temp->Add(m_slider, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL, 0);
temp->Add(m_slider, 1, wxEXPAND, 0);
temp->Add(m_textctrl, 0, wxALIGN_CENTER_VERTICAL, 0);
m_slider->Bind(wxEVT_SLIDER, ([this](wxCommandEvent e) {

View File

@ -845,7 +845,7 @@ FirmwareDialog::FirmwareDialog(wxWindow *parent) :
grid->Add(port_sizer, 0, wxEXPAND);
grid->Add(label_progress, 0, wxALIGN_CENTER_VERTICAL);
grid->Add(p->progressbar, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
grid->Add(p->progressbar, 1, wxEXPAND);
grid->Add(label_status, 0, wxALIGN_CENTER_VERTICAL);
grid->Add(p->txt_status, 0, wxEXPAND);

View File

@ -239,7 +239,7 @@ void Tab::create_preset_tab()
const float scale_factor = em_unit(this)*0.1;// GetContentScaleFactor();
m_top_hsizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(m_top_hsizer, 0, wxEXPAND | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 3);
sizer->Add(m_top_hsizer, 0, wxEXPAND | wxBOTTOM, 3);
m_top_hsizer->Add(m_presets_choice, 0, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, 3);
m_top_hsizer->AddSpacer(int(4*scale_factor));
@ -265,7 +265,7 @@ void Tab::create_preset_tab()
m_h_buttons_sizer->AddSpacer(int(8*scale_factor));
m_h_buttons_sizer->Add(m_btn_compare_preset, 0, wxALIGN_CENTER_VERTICAL);
m_top_hsizer->Add(m_h_buttons_sizer, 1, wxEXPAND | wxALIGN_CENTRE_VERTICAL);
m_top_hsizer->Add(m_h_buttons_sizer, 1, wxEXPAND);
m_top_hsizer->AddSpacer(int(16*scale_factor));
// StretchSpacer has a strange behavior under OSX, so
// There is used just additional sizer for m_mode_sizer with right alignment

View File

@ -357,7 +357,7 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector<float>& matrix, con
hsizer->AddSpacer(10);
hsizer->Add(new wxStaticText(m_page_simple, wxID_ANY, wxString(_(L("Tool #"))) << i + 1 << ": "), 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
gridsizer_simple->Add(hsizer, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
gridsizer_simple->Add(hsizer, 1, wxEXPAND);
gridsizer_simple->Add(m_old.back(),0);
gridsizer_simple->Add(m_new.back(),0);
}