From bb5887c5da9b2986bc8d077b44cdb17b2e0013c5 Mon Sep 17 00:00:00 2001 From: Maeyanie Date: Sat, 31 Jan 2026 20:17:23 -0500 Subject: [PATCH] Move "bits" to inside the spinctrl box. --- src/slic3r/GUI/Preferences.cpp | 7 ++++--- src/slic3r/GUI/Preferences.hpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index d2a754430f..b8d72f24f1 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -557,7 +557,7 @@ wxBoxSizer *PreferencesDialog::create_item_input(wxString title, wxString title2 return sizer_input; } -wxBoxSizer *PreferencesDialog::create_item_spinctrl(wxString title, wxString title2, wxString tooltip, std::string param, +wxBoxSizer *PreferencesDialog::create_item_spinctrl(wxString title, wxString title2, wxString title3, wxString tooltip, std::string param, int min, int max, std::function onchange) { wxBoxSizer *sizer_input = new wxBoxSizer(wxHORIZONTAL); @@ -567,13 +567,13 @@ wxBoxSizer *PreferencesDialog::create_item_spinctrl(wxString title, wxString tit input_title->SetToolTip(tooltip); input_title->Wrap(DESIGN_TITLE_SIZE.x); - auto input = new ::SpinInput(m_parent, wxEmptyString, wxEmptyString, wxDefaultPosition, DESIGN_INPUT_SIZE, wxSP_ARROW_KEYS, + auto input = new ::SpinInput(m_parent, wxEmptyString, title2, wxDefaultPosition, DESIGN_INPUT_SIZE, wxSP_ARROW_KEYS, min, max, stoi(app_config->get(param))); StateColor input_bg(std::pair(wxColour("#F0F0F1"), StateColor::Disabled), std::pair(*wxWHITE, StateColor::Enabled)); input->SetBackgroundColor(input_bg); input->SetToolTip(tooltip); - auto second_title = new wxStaticText(m_parent, wxID_ANY, title2, wxDefaultPosition, wxDefaultSize, 0); + auto second_title = new wxStaticText(m_parent, wxID_ANY, title3, wxDefaultPosition, wxDefaultSize, 0); second_title->SetForegroundColour(DESIGN_GRAY900_COLOR); second_title->SetFont(::Label::Body_14); second_title->SetToolTip(tooltip); @@ -1362,6 +1362,7 @@ void PreferencesDialog::create_items() auto item_draco_position_bits = create_item_spinctrl(_L("Draco dimensional accuracy on export"), _L("bits"), + wxEmptyString, _L("0 bits disables quantization producing an effectively lossless but compressed file.\n" "~16 bits may be recommended and within the tolerances of 3D printing.\n" "More bits results in better quality and dimensional accuracy but larger file size.\n"), diff --git a/src/slic3r/GUI/Preferences.hpp b/src/slic3r/GUI/Preferences.hpp index 2b0dee363f..144b111290 100644 --- a/src/slic3r/GUI/Preferences.hpp +++ b/src/slic3r/GUI/Preferences.hpp @@ -91,7 +91,7 @@ public: wxBoxSizer *create_item_button(wxString title, wxString title2, wxString tooltip, wxString tooltip2, std::function onclick); wxBoxSizer *create_item_downloads(wxString title, wxString tooltip); wxBoxSizer *create_item_input(wxString title, wxString title2, wxString tooltip, std::string param, std::function onchange = {}); - wxBoxSizer *create_item_spinctrl(wxString title, wxString title2, wxString tooltip, std::string param, int min, int max, std::function onchange = nullptr); + wxBoxSizer *create_item_spinctrl(wxString title, wxString title2, wxString title3, wxString tooltip, std::string param, int min, int max, std::function onchange = nullptr); wxBoxSizer *create_camera_orbit_mult_input(wxString title, wxString tooltip); wxBoxSizer *create_item_backup(wxString title, wxString tooltip); wxBoxSizer *create_item_auto_reslice(wxString title, wxString checkbox_tooltip, wxString delay_tooltip);