mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00: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:
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user