Browse Source

Fix glBars for high-dpi/scale-factor systems

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
a56e137f80
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 9 additions and 2 deletions
  1. +1
    -1
      plugins/Cardinal/src/HostMIDI.cpp
  2. +8
    -1
      plugins/Cardinal/src/glBars.cpp

+ 1
- 1
plugins/Cardinal/src/HostMIDI.cpp View File

@@ -756,7 +756,7 @@ struct HostMIDIWidget : ModuleWidget {
drawTextLine(args.vg, 2, "Velocity");
drawTextLine(args.vg, 3, "Aftertouch");
drawTextLine(args.vg, 4, "Pitchbend");
drawTextLine(args.vg, 5, "Mod Wheel");
drawTextLine(args.vg, 5, "ModWheel");
drawTextLine(args.vg, 6, "Start");
drawTextLine(args.vg, 7, "Stop");
drawTextLine(args.vg, 8, "Cont");


+ 8
- 1
plugins/Cardinal/src/glBars.cpp View File

@@ -67,7 +67,8 @@ struct glBarsRendererWidget : OpenGlWidget {
glBarsRendererWidget(glBarsModule* const module)
: glBars(module)
{
oversample = 2.0f;
if (APP->window->pixelRatio < 2.0f)
oversample = 2.0f;
}

void drawFramebuffer() override {
@@ -93,6 +94,12 @@ struct glBarsRendererWidget : OpenGlWidget {
glPopMatrix();
glEnable(GL_BLEND);
}

void step() override {
OpenGlWidget::step();

oversample = APP->window->pixelRatio < 2.0f ? 2.0f : 1.0f;
}
};

struct glBarsWidget : ModuleWidget {


Loading…
Cancel
Save