From 6f34eb312907c80f4cda674c039092419e045a44 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 12 Nov 2022 01:44:53 +0100 Subject: [PATCH] Add a 'Q: ' prefix to the resonance in tooltip --- plugins/diopser/src/editor/xy_pad.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/diopser/src/editor/xy_pad.rs b/plugins/diopser/src/editor/xy_pad.rs index bf16ed81..d40513d3 100644 --- a/plugins/diopser/src/editor/xy_pad.rs +++ b/plugins/diopser/src/editor/xy_pad.rs @@ -148,8 +148,13 @@ impl XyPad { // right of the mouse cursor. VStack::new(cx, move |cx| { // The X-parameter is the 'important' one, so we'll display that at - // the bottom since it's closer to the mouse cursor - Label::new(cx, y_display_value_lens); + // the bottom since it's closer to the mouse cursor. We'll also + // hardcode the `Q: ` prefix for now to make it a bit clearer and to + // reduce the length difference between the lines a bit. + Label::new( + cx, + y_display_value_lens.map(|value| format!("Q: {value}")), + ); Label::new(cx, x_display_value_lens); }) .class("xy-pad__tooltip")