mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Ramming config improvements to enable support for Prusa MMU3 (#9935)
* Ported ramming configuration improvements from prusa slicer: Hold cmd to move all values, more granular time settings and higher maximum values. * improve variable name, change space * Move the label under the ramming chart * Experimenting with values label for ramming chart * Fix the label position and make the background 20% transparent * update the way the multiline label is done * reorder commands --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b410154cb3
commit
686a9bd44a
@@ -7,6 +7,7 @@
|
||||
#include "I18N.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include "format.hpp"
|
||||
#include "libslic3r/Color.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
#include "Widgets/StaticLine.hpp"
|
||||
@@ -14,6 +15,7 @@
|
||||
#include "slic3r/Utils/ColorSpaceConvert.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "Widgets/Label.hpp"
|
||||
|
||||
using namespace Slic3r;
|
||||
using namespace Slic3r::GUI;
|
||||
@@ -115,10 +117,24 @@ RammingPanel::RammingPanel(wxWindow* parent, const std::string& parameters)
|
||||
update_ui(m_chart);
|
||||
sizer_chart->Add(m_chart, 0, wxALL, 5);
|
||||
|
||||
m_widget_time = new SpinInput(this, wxEmptyString, "ms" , wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 0 , 5000 , 3000, 500);
|
||||
// Create help text for constant flow rate dragging
|
||||
std::string ctrl_str = GUI::shortkey_ctrl_prefix();
|
||||
if (!ctrl_str.empty() && ctrl_str.back() == '+')
|
||||
ctrl_str.pop_back(); // Remove trailing '+'
|
||||
wxString message = format_wxstr(_L("For constant flow rate, hold %1% while dragging."), ctrl_str);
|
||||
Label* label = new Label(this, wxEmptyString);
|
||||
wxClientDC dc(label);
|
||||
wxString multiline_message;
|
||||
label->SetFont(Label::Body_14);
|
||||
label->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
|
||||
label->split_lines(dc, scale(470), message, multiline_message);
|
||||
label->SetLabel(multiline_message);
|
||||
sizer_chart->Add(label, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
m_widget_time = new SpinInput(this, wxEmptyString, "ms" , wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 0 , 5000 , 3000, 250);
|
||||
m_widget_volume = new SpinInput(this, wxEmptyString, "mm³", wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 0 , 10000, 0 );
|
||||
m_widget_ramming_line_width_multiplicator = new SpinInput(this, wxEmptyString, "%" , wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 10, 200 , 100 );
|
||||
m_widget_ramming_step_multiplicator = new SpinInput(this, wxEmptyString, "%" , wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 10, 200 , 100 );
|
||||
m_widget_ramming_line_width_multiplicator = new SpinInput(this, wxEmptyString, "%" , wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 10, 300 , 100 );
|
||||
m_widget_ramming_step_multiplicator = new SpinInput(this, wxEmptyString, "%" , wxDefaultPosition, wxSize(scale(120), -1), wxSP_ARROW_KEYS, 10, 300 , 100 );
|
||||
|
||||
auto add_title = [this, sizer_param](wxString label){
|
||||
auto title = new StaticLine(this, 0, label);
|
||||
|
||||
Reference in New Issue
Block a user