From d9003ca2d15fcbd7dc9fe79c19b6e612030720c4 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 22 Mar 2022 18:49:46 +0100 Subject: [PATCH] Don't use a ScrollView for Dipser's generic editor --- Cargo.lock | 2 +- plugins/diopser/src/editor.rs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8932a045..c9545c91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -641,7 +641,7 @@ name = "crisp" version = "0.1.0" dependencies = [ "nih_plug", - "nih_plug_iced", + "nih_plug_vizia", ] [[package]] diff --git a/plugins/diopser/src/editor.rs b/plugins/diopser/src/editor.rs index 35d4b908..349ad57e 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(360, 300) + ViziaState::from_size(380, 305) } pub(crate) fn create( @@ -57,13 +57,14 @@ pub(crate) fn create( .child_top(Stretch(1.0)) .child_bottom(Pixels(0.0)) // Make this more or less align with the parameters column - .right(Percentage(14.0)); + .right(Percentage(12.0)); - ScrollView::new(cx, 0.0, 0.0, false, true, |cx| { - GenericUI::new(cx, Data::params); - }) - .width(Percentage(100.0)); + // See the Crisp generic UI for an example using a ScrollView + GenericUI::new(cx, Data::params) + .width(Percentage(100.0)) + .child_top(Pixels(5.0)); }) + .width(Percentage(100.0)) .row_between(Pixels(0.0)) .child_left(Stretch(1.0)) .child_right(Stretch(1.0));