From 4086ff724fc620f555a662fa49c6adf0e47e91c1 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 22 Mar 2022 18:50:50 +0100 Subject: [PATCH] Fix casing on GenericUi --- nih_plug_vizia/src/widgets.rs | 2 +- nih_plug_vizia/src/widgets/generic_ui.rs | 12 ++++++------ plugins/diopser/src/editor.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nih_plug_vizia/src/widgets.rs b/nih_plug_vizia/src/widgets.rs index 6432c5cf..d516cf5b 100644 --- a/nih_plug_vizia/src/widgets.rs +++ b/nih_plug_vizia/src/widgets.rs @@ -16,7 +16,7 @@ mod param_slider; mod peak_meter; pub mod util; -pub use generic_ui::GenericUI; +pub use generic_ui::GenericUi; pub use param_slider::{ParamSlider, ParamSliderExt, ParamSliderStyle}; pub use peak_meter::PeakMeter; diff --git a/nih_plug_vizia/src/widgets/generic_ui.rs b/nih_plug_vizia/src/widgets/generic_ui.rs index de545d40..e2b984dc 100644 --- a/nih_plug_vizia/src/widgets/generic_ui.rs +++ b/nih_plug_vizia/src/widgets/generic_ui.rs @@ -12,9 +12,9 @@ use super::{ParamSlider, ParamSliderExt, ParamSliderStyle}; /// [`new()`][`Self::new()`] method to have the generic UI decide which widget to use for your /// parmaeters, or you can use the [`new_custom()`][`Self::new_custom()`] method to determine this /// yourself. -pub struct GenericUI; +pub struct GenericUi; -impl GenericUI { +impl GenericUi { /// Creates a new [`GenericUi`] for all provided parameters. Use /// [`new_custom()`][Self::new_custom()] to decide which widget gets used for each parameter. /// @@ -22,11 +22,11 @@ impl GenericUI { /// /// ```ignore /// ScrollView::new(cx, 0.0, 0.0, false, true, |cx| { - /// GenericUI::new(cx, Data::params); + /// GenericUi::new(cx, Data::params); /// }) /// .width(Percentage(100.0)); ///``` - pub fn new(cx: &mut Context, params: L) -> Handle<'_, GenericUI> + pub fn new(cx: &mut Context, params: L) -> Handle<'_, GenericUi> where L: Lens> + Copy, PsPtr: 'static + Deref, @@ -69,7 +69,7 @@ impl GenericUI { cx: &mut Context, params: L, mut make_widget: impl FnMut(&mut Context, ParamPtr), - ) -> Handle<'_, GenericUI> + ) -> Handle<'_, GenericUi> where L: Lens> + Copy, PsPtr: 'static + Deref, @@ -87,7 +87,7 @@ impl GenericUI { } } -impl View for GenericUI { +impl View for GenericUi { fn element(&self) -> Option { Some(String::from("generic-ui")) } diff --git a/plugins/diopser/src/editor.rs b/plugins/diopser/src/editor.rs index 349ad57e..bd40658c 100644 --- a/plugins/diopser/src/editor.rs +++ b/plugins/diopser/src/editor.rs @@ -60,7 +60,7 @@ pub(crate) fn create( .right(Percentage(12.0)); // See the Crisp generic UI for an example using a ScrollView - GenericUI::new(cx, Data::params) + GenericUi::new(cx, Data::params) .width(Percentage(100.0)) .child_top(Pixels(5.0)); })