1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Bug 2473 - Linux: Numbers on meters have opaque backgrounds

This commit is contained in:
Leland Lucius 2021-02-11 19:48:32 -06:00
parent e0096f7fc7
commit cd359768a6

View File

@ -532,6 +532,22 @@ void MeterPanel::OnPaint(wxPaintEvent & WXUNUSED(event))
wxColor yellow(255, 255, 0);
wxColor red(255, 0, 0);
// Bug #2473 - (Sort of) Hack to make text on meters more
// visible with darker backgrounds. It would be better to have
// different colors entirely and as part of the theme.
if (GetBackgroundColour().GetLuminance() < 0.25)
{
green = wxColor(117-100, 215-100, 112-100);
yellow = wxColor(255-100, 255-100, 0);
red = wxColor(255-100, 0, 0);
}
else if (GetBackgroundColour().GetLuminance() < 0.50)
{
green = wxColor(117-50, 215-50, 112-50);
yellow = wxColor(255-50, 255-50, 0);
red = wxColor(255-50, 0, 0);
}
// Draw the meter bars at maximum levels
for (unsigned int i = 0; i < mNumBars; i++)
{