Browse Source

Use nvgGlobalTint() instead of nvgGlobalAlpha() for drawing lights.

tags/v2.0.1
Andrew Belt 3 years ago
parent
commit
f369452876
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      src/Octave.cpp
  2. +1
    -1
      src/Quantizer.cpp
  3. +1
    -1
      src/Scope.cpp
  4. +1
    -1
      src/VCA.cpp

+ 1
- 1
src/Octave.cpp View File

@@ -66,7 +66,7 @@ struct OctaveButton : Widget {
activeOctave = std::round(pq->getValue()); activeOctave = std::round(pq->getValue());


// Disable tinting when rack brightness is decreased // Disable tinting when rack brightness is decreased
nvgGlobalAlpha(args.vg, 1.0);
nvgGlobalTint(args.vg, color::WHITE);


if (activeOctave == octave) { if (activeOctave == octave) {
// Enabled // Enabled


+ 1
- 1
src/Quantizer.cpp View File

@@ -129,7 +129,7 @@ struct QuantizerButton : OpaqueWidget {
Rect r = box.zeroPos().grow(Vec(margin, margin / 2).neg()); Rect r = box.zeroPos().grow(Vec(margin, margin / 2).neg());


// Disable tinting when rack brightness is decreased // Disable tinting when rack brightness is decreased
nvgGlobalAlpha(args.vg, 1.0);
nvgGlobalTint(args.vg, color::WHITE);


nvgBeginPath(args.vg); nvgBeginPath(args.vg);
nvgRect(args.vg, RECT_ARGS(r)); nvgRect(args.vg, RECT_ARGS(r));


+ 1
- 1
src/Scope.cpp View File

@@ -302,7 +302,7 @@ struct ScopeDisplay : TransparentWidget {
return; return;


// Disable tinting when rack brightness is decreased // Disable tinting when rack brightness is decreased
nvgGlobalAlpha(args.vg, 1.0);
nvgGlobalTint(args.vg, color::WHITE);


float gainX = std::pow(2.f, std::round(module->params[Scope::X_SCALE_PARAM].getValue())) / 10.f; float gainX = std::pow(2.f, std::round(module->params[Scope::X_SCALE_PARAM].getValue())) / 10.f;
float gainY = std::pow(2.f, std::round(module->params[Scope::Y_SCALE_PARAM].getValue())) / 10.f; float gainY = std::pow(2.f, std::round(module->params[Scope::Y_SCALE_PARAM].getValue())) / 10.f;


+ 1
- 1
src/VCA.cpp View File

@@ -206,7 +206,7 @@ struct VCA_1VUKnob : SliderKnob {
nvgFill(args.vg); nvgFill(args.vg);


// Disable tinting when rack brightness is decreased // Disable tinting when rack brightness is decreased
nvgGlobalAlpha(args.vg, 1.0);
nvgGlobalTint(args.vg, color::WHITE);


const Vec margin = Vec(3, 3); const Vec margin = Vec(3, 3);
Rect r = box.zeroPos().grow(margin.neg()); Rect r = box.zeroPos().grow(margin.neg());


Loading…
Cancel
Save