mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
Use TranslatableString::Format for Compressor v2 plot accessibility.
Signed-off-by: Max Maisel <max.maisel@posteo.de>
This commit is contained in:
parent
9606aa7312
commit
1b76326d01
@ -831,6 +831,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
|
|||||||
mResponsePlot = S.MinSize( { 200, 200 } )
|
mResponsePlot = S.MinSize( { 200, 200 } )
|
||||||
.AddPlot({}, 0, 5, -0.2, 1.2, XO("s"), XO(""),
|
.AddPlot({}, 0, 5, -0.2, 1.2, XO("s"), XO(""),
|
||||||
Ruler::IntFormat, Ruler::RealFormat, 2);
|
Ruler::IntFormat, Ruler::RealFormat, 2);
|
||||||
|
mResponsePlot->SetName(XO("Compressor step response plot"));
|
||||||
|
|
||||||
plot = mResponsePlot->GetPlotData(0);
|
plot = mResponsePlot->GetPlotData(0);
|
||||||
plot->pen = std::unique_ptr<wxPen>(
|
plot->pen = std::unique_ptr<wxPen>(
|
||||||
@ -1594,9 +1595,8 @@ void EffectCompressor2::UpdateCompressorPlot()
|
|||||||
plot->ydata[i] = plot->xdata[i] +
|
plot->ydata[i] = plot->xdata[i] +
|
||||||
LINEAR_TO_DB(CompressorGain(DB_TO_LINEAR(plot->xdata[i])));
|
LINEAR_TO_DB(CompressorGain(DB_TO_LINEAR(plot->xdata[i])));
|
||||||
|
|
||||||
// XXX: accessibility but fails with TranslatableString required
|
mGainPlot->SetName(XO("Compressor gain reduction: %.1f dB").
|
||||||
// mGainPlot->SetName(wxString::Format(
|
Format(plot->ydata[xsize-1]));
|
||||||
// "Compressor gain reduction: %.1f dB", plot->ydata[xsize-1]));
|
|
||||||
mGainPlot->Refresh(false);
|
mGainPlot->Refresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user