From 922a81f654dcf38abf97c86cee7dee4b9d49fbf5 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 11 Nov 2022 16:21:19 +0100 Subject: [PATCH] Drop all mentions of vizia point scale It does use pixels instead of points. --- nih_plug_vizia/assets/theme.css | 1 - plugins/crisp/src/editor.rs | 5 +---- plugins/diopser/src/editor.rs | 5 +---- plugins/examples/gain_gui_vizia/src/editor.rs | 5 +---- plugins/spectral_compressor/src/editor.rs | 15 ++++++--------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/nih_plug_vizia/assets/theme.css b/nih_plug_vizia/assets/theme.css index c0cb9336..8cfffc11 100644 --- a/nih_plug_vizia/assets/theme.css +++ b/nih_plug_vizia/assets/theme.css @@ -3,7 +3,6 @@ :root { background-color: #fafafa; color: #0a0a0a; - /* VIZIA uses points instead of pixels, this is 20px */ font-size: 15; } diff --git a/plugins/crisp/src/editor.rs b/plugins/crisp/src/editor.rs index 85b488b5..054fd0dc 100644 --- a/plugins/crisp/src/editor.rs +++ b/plugins/crisp/src/editor.rs @@ -22,9 +22,6 @@ use std::sync::Arc; use crate::CrispParams; -/// VIZIA uses points instead of pixels for text -const POINT_SCALE: f32 = 0.75; - #[derive(Lens)] struct Data { params: Arc, @@ -55,7 +52,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Crisp") .font(assets::NOTO_SANS_THIN) - .font_size(40.0 * POINT_SCALE) + .font_size(30.0) .height(Pixels(50.0)) .child_top(Stretch(1.0)) .child_bottom(Pixels(0.0)) diff --git a/plugins/diopser/src/editor.rs b/plugins/diopser/src/editor.rs index 9f1fbab1..dcb2bfd0 100644 --- a/plugins/diopser/src/editor.rs +++ b/plugins/diopser/src/editor.rs @@ -26,9 +26,6 @@ use crate::DiopserParams; mod button; -/// VIZIA uses points instead of pixels for text -const POINT_SCALE: f32 = 0.75; - const EDITOR_WIDTH: u32 = 600; const EDITOR_HEIGHT: u32 = 490; @@ -80,7 +77,7 @@ fn top_bar(cx: &mut Context) { HStack::new(cx, |cx| { Label::new(cx, "Diopser") .font(assets::NOTO_SANS_THIN) - .font_size(50.0 * POINT_SCALE) + .font_size(40.0) .top(Pixels(-2.0)) .left(Pixels(7.0)); diff --git a/plugins/examples/gain_gui_vizia/src/editor.rs b/plugins/examples/gain_gui_vizia/src/editor.rs index 9280c75a..a5da0d81 100644 --- a/plugins/examples/gain_gui_vizia/src/editor.rs +++ b/plugins/examples/gain_gui_vizia/src/editor.rs @@ -9,9 +9,6 @@ use std::time::Duration; use crate::GainParams; -/// VIZIA uses points instead of pixels for text -const POINT_SCALE: f32 = 0.75; - const STYLE: &str = r#""#; #[derive(Lens)] @@ -49,7 +46,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Gain GUI") .font(assets::NOTO_SANS_THIN) - .font_size(40.0 * POINT_SCALE) + .font_size(30.0) .height(Pixels(50.0)) .child_top(Stretch(1.0)) .child_bottom(Pixels(0.0)); diff --git a/plugins/spectral_compressor/src/editor.rs b/plugins/spectral_compressor/src/editor.rs index 64c55dab..27629f98 100644 --- a/plugins/spectral_compressor/src/editor.rs +++ b/plugins/spectral_compressor/src/editor.rs @@ -22,9 +22,6 @@ use std::sync::Arc; use crate::SpectralCompressorParams; -/// VIZIA uses points instead of pixels for text -const POINT_SCALE: f32 = 0.75; - #[derive(Lens)] struct Data { params: Arc, @@ -60,7 +57,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Spectral Compressor") .font(assets::NOTO_SANS_THIN) - .font_size(40.0 * POINT_SCALE) + .font_size(30.0) .height(Pixels(50.0)) .child_top(Stretch(1.0)) .child_bottom(Pixels(0.0)) @@ -71,7 +68,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Globals") .font(assets::NOTO_SANS_THIN) - .font_size(30.0 * POINT_SCALE) + .font_size(23.0) .left(Stretch(1.0)) .right(Pixels(10.0)) .bottom(Pixels(-10.0)); @@ -84,7 +81,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Threshold") .font(assets::NOTO_SANS_THIN) - .font_size(30.0 * POINT_SCALE) + .font_size(23.0) .left(Stretch(1.0)) .right(Pixels(10.0)) .bottom(Pixels(-10.0)); @@ -97,7 +94,7 @@ pub(crate) fn create( you use this in a project, make sure to bounce things to audio just in \ case they'll sound different later.", ) - .font_size(15.0 * POINT_SCALE) + .font_size(23.0) .left(Pixels(15.0)) .right(Pixels(5.0)) .width(Stretch(1.0)); @@ -112,7 +109,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Upwards") .font(assets::NOTO_SANS_THIN) - .font_size(30.0 * POINT_SCALE) + .font_size(23.0) .left(Stretch(1.0)) .right(Pixels(10.0)) .bottom(Pixels(-10.0)); @@ -147,7 +144,7 @@ pub(crate) fn create( VStack::new(cx, |cx| { Label::new(cx, "Downwards") .font(assets::NOTO_SANS_THIN) - .font_size(30.0 * POINT_SCALE) + .font_size(23.0) .left(Stretch(1.0)) .right(Pixels(10.0)) .bottom(Pixels(-10.0));