1
0
Fork 0

Update ParamButton for upstream vizia changes

This commit is contained in:
Robbert van der Helm 2023-11-14 23:43:48 +01:00
parent 762844f8f6
commit b07ec12d04

View file

@ -39,7 +39,7 @@ impl ParamButton {
FMap: Fn(&Params) -> &P + Copy + 'static, FMap: Fn(&Params) -> &P + Copy + 'static,
{ {
Self { Self {
param_base: ParamWidgetBase::new(cx, params.clone(), params_to_param), param_base: ParamWidgetBase::new(cx, params, params_to_param),
use_scroll_wheel: true, use_scroll_wheel: true,
label_override: None, label_override: None,
@ -48,7 +48,7 @@ impl ParamButton {
} }
.build( .build(
cx, cx,
ParamWidgetBase::build_view(params.clone(), params_to_param, move |cx, param_data| { ParamWidgetBase::build_view(params, params_to_param, move |cx, param_data| {
Binding::new(cx, Self::label_override, move |cx, label_override| { Binding::new(cx, Self::label_override, move |cx, label_override| {
match label_override.get(cx) { match label_override.get(cx) {
Some(label_override) => Label::new(cx, &label_override), Some(label_override) => Label::new(cx, &label_override),