diff --git a/nih_plug_vizia/assets/theme.css b/nih_plug_vizia/assets/theme.css index be2ec6f9..4a6fb236 100644 --- a/nih_plug_vizia/assets/theme.css +++ b/nih_plug_vizia/assets/theme.css @@ -23,3 +23,10 @@ param-slider:hover { param-slider .fill { background-color: #c4c4c4; } + +/* This is a textbox, but we want it to appear just like the label */ +param-slider .value-entry { + /* Vizia doesn't support the unset value */ + background-color: transparent; + border-width: 0px; +} diff --git a/nih_plug_vizia/src/widgets/param_slider.rs b/nih_plug_vizia/src/widgets/param_slider.rs index 0ef719f1..03b5e359 100644 --- a/nih_plug_vizia/src/widgets/param_slider.rs +++ b/nih_plug_vizia/src/widgets/param_slider.rs @@ -55,9 +55,10 @@ enum ParamSliderInternalEvent { } impl Model for ParamSliderInternal { - fn event(&mut self, _cx: &mut Context, event: &mut Event) { + fn event(&mut self, cx: &mut Context, event: &mut Event) { if let Some(ParamSliderInternalEvent::SetTextInputActive(value)) = event.message.downcast() { + cx.current.set_active(cx, *value); self.text_input_active = *value; } }