From 077c179a1ee87a40d850b10ab73497ccaf73a243 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 20 Jan 2018 12:22:30 -0500 Subject: [PATCH] Re-fix LightWidget drawing --- src/app/LightWidget.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/app/LightWidget.cpp b/src/app/LightWidget.cpp index 70f3a00d..2ec2a3f5 100644 --- a/src/app/LightWidget.cpp +++ b/src/app/LightWidget.cpp @@ -14,7 +14,6 @@ void LightWidget::draw(NVGcontext *vg) { drawHalo(vg); } - void LightWidget::drawLight(NVGcontext *vg) { float radius = box.size.x / 2.0; @@ -25,19 +24,19 @@ void LightWidget::drawLight(NVGcontext *vg) { nvgFillColor(vg, bgColor); nvgFill(vg); - // // Border - // nvgStrokeWidth(vg, 1.0); - // NVGcolor borderColor = bgColor; - // borderColor.a *= 0.5; - // nvgStrokeColor(vg, borderColor); - // nvgStroke(vg); + // Border + nvgStrokeWidth(vg, 1.0); + NVGcolor borderColor = bgColor; + borderColor.a *= 0.5; + nvgStrokeColor(vg, borderColor); + nvgStroke(vg); // Inner glow nvgFillColor(vg, color); + nvgGlobalCompositeOperation(vg, NVG_LIGHTER); nvgFill(vg); } - void LightWidget::drawHalo(NVGcontext *vg) { float radius = box.size.x / 2.0; float oradius = radius + 15.0; @@ -57,6 +56,4 @@ void LightWidget::drawHalo(NVGcontext *vg) { } - - } // namespace rack