Browse Source

Fix Host Audio 2 color rendering through top overlays

Related to #123

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 4 years ago
parent
commit
84d1bdc0fb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      plugins/Cardinal/src/HostAudio.cpp

+ 2
- 2
plugins/Cardinal/src/HostAudio.cpp 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);


Loading…
Cancel
Save