From 62a7994877eda27f2b353115f631ca0176eec818 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 15 Mar 2022 17:09:24 +0100 Subject: [PATCH] Start the peak meter at -90 dB This makes the spacing look a bit nicer. --- nih_plug_iced/src/widgets/peak_meter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nih_plug_iced/src/widgets/peak_meter.rs b/nih_plug_iced/src/widgets/peak_meter.rs index e33ce409..30e62bb1 100644 --- a/nih_plug_iced/src/widgets/peak_meter.rs +++ b/nih_plug_iced/src/widgets/peak_meter.rs @@ -143,10 +143,10 @@ where .text_size .unwrap_or_else(|| (renderer.default_size() as f32 * 0.7).round() as u16); - // We'll draw a simple horizontal for [-200, 20] dB where we'll treat -80 as -infinity, with + // We'll draw a simple horizontal for [-90, 20] dB where we'll treat -80 as -infinity, with // a label containing the tick markers below it. If `.hold_time()` was called then we'll // also display the last held value - const MIN_TICK: f32 = -100.0; + const MIN_TICK: f32 = -90.0; const MAX_TICK: f32 = 20.0; let text_ticks = [-80i32, -60, -40, -20, 0]; // Draw a tick with one pixel in between, otherwise the bilinear interpolation makes