diff options
author | YuSanka <yusanka@gmail.com> | 2020-02-12 14:08:43 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2020-02-12 14:51:34 +0300 |
commit | fcd1cf371ba97cdceb380890998fcfcae05605ea (patch) | |
tree | 4b9b52839b699067fea3fba2bed0418452f0d7b4 /src/slic3r/GUI/OptionsGroup.cpp | |
parent | 2e62f03ba88fd3f4908c687efd6f814233a71cee (diff) |
Alignments of options in settings tabs
+ msw_rescale() is overridden for PrinterTab to rescale of all the option Pages and not just a respect to current print technology
+ A Setting of the option.width in PrintConfig is no need anymore
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.cpp')
-rw-r--r-- | src/slic3r/GUI/OptionsGroup.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 366df4346..4e964ff74 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -128,6 +128,10 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n for (auto opt : option_set) m_options.emplace(opt.opt_id, opt); + // Set sidetext width for a better alignment of options in line + if (option_set.size() > 1) + sidetext_width = Field::def_width_thinner(); + // add mode value for current line to m_options_mode if (!option_set.empty()) m_options_mode.push_back(option_set[0].opt.mode); @@ -274,9 +278,9 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n sizer_tmp->Add(field->getWindow(), 0, wxALIGN_CENTER_VERTICAL, 0); // add sidetext if any - if (option.sidetext != "") { + if (!option.sidetext.empty() || sidetext_width > 0) { auto sidetext = new wxStaticText( this->ctrl_parent(), wxID_ANY, _(option.sidetext), wxDefaultPosition, - wxSize(sidetext_width != -1 ? sidetext_width*wxGetApp().em_unit() : -1, -1) /*wxDefaultSize*/, wxALIGN_LEFT); + wxSize(sidetext_width != -1 ? sidetext_width*wxGetApp().em_unit() : -1, -1), wxALIGN_LEFT); sidetext->SetBackgroundStyle(wxBG_STYLE_PAINT); sidetext->SetFont(wxGetApp().normal_font()); sizer_tmp->Add(sidetext, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 4); @@ -498,7 +502,7 @@ void ConfigOptionsGroup::msw_rescale() // update undo buttons : rescale bitmaps for (const auto& field : m_fields) - field.second->msw_rescale(); + field.second->msw_rescale(sidetext_width>0); const int em = em_unit(parent()); |