Fix Host Audio 2 color rendering through top overlays

Related to #123

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-02-01 21:28:56 +00:00
parent 0ddfc5ce22
commit 84d1bdc0fb
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -392,13 +392,13 @@ struct NanoMeter : Widget {
std::swap(gainMeterL, module->gainMeterL);
std::swap(gainMeterR, module->gainMeterR);
const float heightL = sqrtf(gainMeterL) * usableHeight;
const float heightL = 1.0f + std::sqrt(gainMeterL) * (usableHeight - 1.0f);
nvgBeginPath(args.vg);
nvgRect(args.vg, 0.0f, usableHeight - heightL, box.size.x * 0.5f - 1.0f, heightL);
nvgFill(args.vg);
nvgStroke(args.vg);
const float heightR = sqrtf(gainMeterR) * usableHeight;
const float heightR = 1.0f + std::sqrt(gainMeterR) * (usableHeight - 1.0f);
nvgBeginPath(args.vg);
nvgRect(args.vg, box.size.x * 0.5f + 1.0f, usableHeight - heightR, box.size.x * 0.5f - 2.0f, heightR);
nvgFill(args.vg);