diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index 30990f5..bd99c66 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -1553,7 +1553,10 @@ struct IldaeilNanoMeterIn : NanoMeter { IldaeilModule* const module; IldaeilNanoMeterIn(IldaeilModule* const m) - : module(m) {} + : module(m) + { + withBackground = false; + } void updateMeters() override { @@ -1571,7 +1574,10 @@ struct IldaeilNanoMeterOut : NanoMeter { IldaeilModule* const module; IldaeilNanoMeterOut(IldaeilModule* const m) - : module(m) {} + : module(m) + { + withBackground = false; + } void updateMeters() override { @@ -1613,12 +1619,12 @@ struct IldaeilModuleWidget : ModuleWidgetWithSideScrews<26> { IldaeilNanoMeterIn* const meterIn = new IldaeilNanoMeterIn(module); meterIn->box.pos = Vec(2.0f, startY + padding * 2); - meterIn->box.size = Vec(RACK_GRID_WIDTH * 3 - 2.0f, box.size.y - meterIn->box.pos.y - 20.0f); + meterIn->box.size = Vec(RACK_GRID_WIDTH * 3 - 2.0f, box.size.y - meterIn->box.pos.y - 19.0f); addChild(meterIn); IldaeilNanoMeterOut* const meterOut = new IldaeilNanoMeterOut(module); meterOut->box.pos = Vec(box.size.x - RACK_GRID_WIDTH * 3 + 1.0f, startY + padding * 2); - meterOut->box.size = Vec(RACK_GRID_WIDTH * 3 - 2.0f, box.size.y - meterOut->box.pos.y - 20.0f); + meterOut->box.size = Vec(RACK_GRID_WIDTH * 3 - 2.0f, box.size.y - meterOut->box.pos.y - 19.0f); addChild(meterOut); } diff --git a/plugins/Cardinal/src/Widgets.hpp b/plugins/Cardinal/src/Widgets.hpp index 61b662c..a727e98 100644 --- a/plugins/Cardinal/src/Widgets.hpp +++ b/plugins/Cardinal/src/Widgets.hpp @@ -243,6 +243,7 @@ struct NanoKnob : Knob { struct NanoMeter : Widget { bool hasGainKnob = false; + bool withBackground = true; float gainMeterL = 0.0f; float gainMeterR = 0.0f; @@ -255,15 +256,17 @@ struct NanoMeter : Widget { const float usableHeight = box.size.y - (hasGainKnob ? 10.0f : 0.0f); - // draw background - nvgBeginPath(args.vg); - nvgRect(args.vg, - 0, - 0, - box.size.x, - usableHeight); - nvgFillColor(args.vg, nvgRGB(26, 26, 26)); - nvgFill(args.vg); + if (withBackground) + { + nvgBeginPath(args.vg); + nvgRect(args.vg, + 0, + 0, + box.size.x, + usableHeight); + nvgFillColor(args.vg, nvgRGB(26, 26, 26)); + nvgFill(args.vg); + } nvgFillColor(args.vg, nvgRGBAf(0.76f, 0.11f, 0.22f, 0.5f)); nvgStrokeColor(args.vg, nvgRGBf(0.76f, 0.11f, 0.22f));