From ec44768eb96fce8249a44f386d753a03c8c0e70c Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sat, 14 Jun 2025 11:32:31 +0800 Subject: [PATCH] Fix staticbox content margin on macOS (#9901) --- src/slic3r/GUI/OptionsGroup.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 43707019fb..4322fc04e3 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -258,10 +258,10 @@ void OptionsGroup::activate_line(Line& line) ) { // BBS: new layout const auto h_sizer = new wxBoxSizer(wxHORIZONTAL); - sizer->Add(h_sizer, 1, wxEXPAND | wxALL, wxOSX ? 0 : 15); + sizer->Add(h_sizer, 1, wxEXPAND | wxALL, (wxOSX && !staticbox) ? 0 : 15); if (line.widget != nullptr) { // description lines - sizer->Add(line.widget(this->ctrl_parent()), 0, wxEXPAND | wxALL, wxOSX ? 0 : 15); + sizer->Add(line.widget(this->ctrl_parent()), 0, wxEXPAND | wxALL, (wxOSX && !staticbox) ? 0 : 15); return; } if (!line.get_extra_widgets().empty()) { @@ -282,9 +282,9 @@ void OptionsGroup::activate_line(Line& line) // BBS: new layout custom_ctrl->SetLabel(""); if (is_legend_line) - sizer->Add(custom_ctrl, 0, wxEXPAND | wxLEFT, wxOSX ? 0 : 10); + sizer->Add(custom_ctrl, 0, wxEXPAND | wxLEFT, (wxOSX && !staticbox) ? 0 : 10); else - sizer->Add(custom_ctrl, 0, wxEXPAND | wxALL, wxOSX || !staticbox ? 0 : 5); + sizer->Add(custom_ctrl, 0, wxEXPAND | wxALL, !staticbox ? 0 : 5); } // Set sidetext width for a better alignment of options in line @@ -304,7 +304,7 @@ void OptionsGroup::activate_line(Line& line) // BBS: new layout const auto h_sizer = new wxBoxSizer(wxHORIZONTAL); - sizer->Add(h_sizer, 1, wxEXPAND | wxALL, wxOSX ? 0 : 5); + sizer->Add(h_sizer, 1, wxEXPAND | wxALL, (wxOSX && !staticbox) ? 0 : 5); if (is_window_field(field)) h_sizer->Add(field->getWindow(), 1, wxEXPAND | wxLEFT, option.opt.multiline ? 0 : titleWidth * wxGetApp().em_unit()); if (is_sizer_field(field)) @@ -509,7 +509,7 @@ bool OptionsGroup::activate(std::function throw_if_canceled/* = [](){}*/ static_cast(m_grid_sizer)->SetFlexibleDirection(wxBOTH); static_cast(m_grid_sizer)->AddGrowableCol(grow_col); - sizer->Add(m_grid_sizer, 0, wxEXPAND | wxALL, wxOSX || !staticbox ? 0 : 5); + sizer->Add(m_grid_sizer, 0, wxEXPAND | wxALL, !staticbox ? 0 : 5); // activate lines for (Line& line: m_lines) {