From ee3f4e0b37c25ba4f84663b639a402d8988bbf37 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 22 Mar 2022 19:07:32 +0100 Subject: [PATCH] Fix CurrentStep ParamSlider for non-booleans The width was incorrect. --- nih_plug_vizia/src/widgets/param_slider.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nih_plug_vizia/src/widgets/param_slider.rs b/nih_plug_vizia/src/widgets/param_slider.rs index 7c1afcbd..21045252 100644 --- a/nih_plug_vizia/src/widgets/param_slider.rs +++ b/nih_plug_vizia/src/widgets/param_slider.rs @@ -216,7 +216,9 @@ impl ParamSlider { }; ( (previous_step + current_value) / 2.0, - (next_step + current_value) / 2.0, + ((next_step - current_value) + + (current_value - previous_step)) + / 2.0, ) } };