mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
ImGui sliders clamping:
ImGuiWrapper::slider_float now clamps the value returned by imgui by default. Bare ImGui::SliderFloat allows entering off-scale values when entered by keyboard, which is not nice. The protection can be turned off by the last optional parameter.
This commit is contained in:
parent
1f89b3638c
commit
e93c5d4f20
8 changed files with 41 additions and 36 deletions
|
@ -254,7 +254,7 @@ void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const
|
|||
float widget_align = ImGui::GetCursorPosX();
|
||||
ImGui::PushItemWidth(imgui.get_style_scaling() * 120.0f);
|
||||
m_adaptive_quality = std::clamp(m_adaptive_quality, 0.0f, 1.f);
|
||||
ImGui::SliderFloat("", &m_adaptive_quality, 0.0f, 1.f, "%.2f");
|
||||
imgui.slider_float("", &m_adaptive_quality, 0.0f, 1.f, "%.2f");
|
||||
|
||||
ImGui::Separator();
|
||||
if (imgui.button(_L("Smooth")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue