Fix glBars for high-dpi/scale-factor systems
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
696d60c18b
commit
a56e137f80
2 changed files with 9 additions and 2 deletions
|
|
@ -756,7 +756,7 @@ struct HostMIDIWidget : ModuleWidget {
|
||||||
drawTextLine(args.vg, 2, "Velocity");
|
drawTextLine(args.vg, 2, "Velocity");
|
||||||
drawTextLine(args.vg, 3, "Aftertouch");
|
drawTextLine(args.vg, 3, "Aftertouch");
|
||||||
drawTextLine(args.vg, 4, "Pitchbend");
|
drawTextLine(args.vg, 4, "Pitchbend");
|
||||||
drawTextLine(args.vg, 5, "Mod Wheel");
|
drawTextLine(args.vg, 5, "ModWheel");
|
||||||
drawTextLine(args.vg, 6, "Start");
|
drawTextLine(args.vg, 6, "Start");
|
||||||
drawTextLine(args.vg, 7, "Stop");
|
drawTextLine(args.vg, 7, "Stop");
|
||||||
drawTextLine(args.vg, 8, "Cont");
|
drawTextLine(args.vg, 8, "Cont");
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ struct glBarsRendererWidget : OpenGlWidget {
|
||||||
glBarsRendererWidget(glBarsModule* const module)
|
glBarsRendererWidget(glBarsModule* const module)
|
||||||
: glBars(module)
|
: glBars(module)
|
||||||
{
|
{
|
||||||
|
if (APP->window->pixelRatio < 2.0f)
|
||||||
oversample = 2.0f;
|
oversample = 2.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,6 +94,12 @@ struct glBarsRendererWidget : OpenGlWidget {
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void step() override {
|
||||||
|
OpenGlWidget::step();
|
||||||
|
|
||||||
|
oversample = APP->window->pixelRatio < 2.0f ? 2.0f : 1.0f;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct glBarsWidget : ModuleWidget {
|
struct glBarsWidget : ModuleWidget {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue