diff --git a/nih_plug_vizia/assets/theme.css b/nih_plug_vizia/assets/theme.css index 3353de55..204cbffd 100644 --- a/nih_plug_vizia/assets/theme.css +++ b/nih_plug_vizia/assets/theme.css @@ -11,7 +11,7 @@ font-weight: light; } -scrollview scroll_content { +scrollview > scroll_content { /* Normally the scroll bar overlaps with the content, so we'll add a little offset to prevent that */ child-right: 15px; } diff --git a/nih_plug_vizia/assets/widgets.css b/nih_plug_vizia/assets/widgets.css index 1644755f..716bdb71 100644 --- a/nih_plug_vizia/assets/widgets.css +++ b/nih_plug_vizia/assets/widgets.css @@ -4,10 +4,12 @@ generic-ui { child-space: 10px; col-between: 5px; + /* Otherwise it doesn't interact correctly with scrollview */ + height: auto; layout-type: column; row-between: 5px; } -scrollview > vstack > generic-ui { +scrollview > scroll_content > generic-ui { child-space: 5px; /* Our scrollview styling will already add some padding here */ @@ -16,6 +18,7 @@ scrollview > vstack > generic-ui { generic-ui .row { col-between: 6px; + height: auto; layout-type: row; } @@ -23,7 +26,6 @@ generic-ui .label { left: 1s; top: 1s; bottom: 1s; - right: 0px; } param-button { @@ -69,12 +71,7 @@ param-slider { transition: background-color 100ms; } -/* Vizia doesn't support commas in selectors */ -/* Also, WTB Sass */ -param-slider:active { - background-color: #8080801a; - transition: background-color 100ms; -} +param-slider:active, param-slider:hover { background-color: #8080801a; transition: background-color 100ms; @@ -139,11 +136,7 @@ resize-handle { width: 20px; z-index: 1337; } -resize-handle:active { - opacity: 0.8; - transition: opacity 100ms; -} -/* No commas in VIZIA */ +resize-handle:active, resize-handle:hover { opacity: 0.8; transition: opacity 100ms; diff --git a/nih_plug_vizia/src/widgets/generic_ui.rs b/nih_plug_vizia/src/widgets/generic_ui.rs index ae8fb043..426a7ad4 100644 --- a/nih_plug_vizia/src/widgets/generic_ui.rs +++ b/nih_plug_vizia/src/widgets/generic_ui.rs @@ -30,9 +30,8 @@ impl GenericUi { Ps: Params + 'static, { // Basic styling is done in the `theme.css` style sheet - Self::new_custom(cx, params.clone(), move |cx, param_ptr| { - let params = params.clone(); - HStack::new(cx, move |cx| { + Self::new_custom(cx, params, move |cx, param_ptr| { + HStack::new(cx, |cx| { // Align this on the right Label::new(cx, unsafe { param_ptr.name() }).class("label");