From 0655ce35d8efeb15fa94e52adc7f8199c380ae94 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 23 Mar 2022 13:17:47 +0100 Subject: [PATCH] Hide Diopser's very important parameter --- plugins/diopser/src/editor.rs | 3 ++- plugins/diopser/src/lib.rs | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/diopser/src/editor.rs b/plugins/diopser/src/editor.rs index bd40658c..0e5e97bf 100644 --- a/plugins/diopser/src/editor.rs +++ b/plugins/diopser/src/editor.rs @@ -36,7 +36,7 @@ impl Model for Data {} // Makes sense to also define this here, makes it a bit easier to keep track of pub(crate) fn default_state() -> Arc { - ViziaState::from_size(380, 305) + ViziaState::from_size(380, 270) } pub(crate) fn create( @@ -62,6 +62,7 @@ pub(crate) fn create( // See the Crisp generic UI for an example using a ScrollView GenericUi::new(cx, Data::params) .width(Percentage(100.0)) + .height(Auto) .child_top(Pixels(5.0)); }) .width(Percentage(100.0)) diff --git a/plugins/diopser/src/lib.rs b/plugins/diopser/src/lib.rs index cfb6d8f9..7ed88809 100644 --- a/plugins/diopser/src/lib.rs +++ b/plugins/diopser/src/lib.rs @@ -203,9 +203,11 @@ impl DiopserParams { should_update_filters.store(true, Ordering::Release) })), - very_important: BoolParam::new("Don't touch this", true).with_value_to_string( - Arc::new(|value| String::from(if value { "please don't" } else { "stop it" })), - ), + very_important: BoolParam::new("Don't touch this", true) + .with_value_to_string(Arc::new(|value| { + String::from(if value { "please don't" } else { "stop it" }) + })) + .hide_in_generic_ui(), automation_precision: FloatParam::new( "Automation precision",