From 1b76326d0111de255c98dde7e164fc00405e6dd3 Mon Sep 17 00:00:00 2001 From: Max Maisel Date: Wed, 16 Sep 2020 09:01:21 +0200 Subject: [PATCH] Use TranslatableString::Format for Compressor v2 plot accessibility. Signed-off-by: Max Maisel --- src/effects/Compressor2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/effects/Compressor2.cpp b/src/effects/Compressor2.cpp index 0680afd73..8701a7748 100644 --- a/src/effects/Compressor2.cpp +++ b/src/effects/Compressor2.cpp @@ -831,6 +831,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S) mResponsePlot = S.MinSize( { 200, 200 } ) .AddPlot({}, 0, 5, -0.2, 1.2, XO("s"), XO(""), Ruler::IntFormat, Ruler::RealFormat, 2); + mResponsePlot->SetName(XO("Compressor step response plot")); plot = mResponsePlot->GetPlotData(0); plot->pen = std::unique_ptr( @@ -1594,9 +1595,8 @@ void EffectCompressor2::UpdateCompressorPlot() plot->ydata[i] = plot->xdata[i] + LINEAR_TO_DB(CompressorGain(DB_TO_LINEAR(plot->xdata[i]))); -// XXX: accessibility but fails with TranslatableString required -// mGainPlot->SetName(wxString::Format( -// "Compressor gain reduction: %.1f dB", plot->ydata[xsize-1])); + mGainPlot->SetName(XO("Compressor gain reduction: %.1f dB"). + Format(plot->ydata[xsize-1])); mGainPlot->Refresh(false); }