diff --git a/include/app/LedDisplay.hpp b/include/app/LedDisplay.hpp index 5b6c12ce..f2f41069 100644 --- a/include/app/LedDisplay.hpp +++ b/include/app/LedDisplay.hpp @@ -11,6 +11,7 @@ namespace app { struct LedDisplay : widget::Widget { void draw(const DrawArgs& args) override; + void drawLayer(const DrawArgs& args, int layer) override; }; struct LedDisplaySeparator : widget::Widget { diff --git a/src/app/LedDisplay.cpp b/src/app/LedDisplay.cpp index e3eb752e..a856a490 100644 --- a/src/app/LedDisplay.cpp +++ b/src/app/LedDisplay.cpp @@ -65,6 +65,14 @@ void LedDisplay::draw(const DrawArgs& args) { } +void LedDisplay::drawLayer(const DrawArgs& args, int layer) { + // Draw children inside box + nvgScissor(args.vg, RECT_ARGS(args.clipBox)); + Widget::drawLayer(args, layer); + nvgResetScissor(args.vg); +} + + LedDisplaySeparator::LedDisplaySeparator() { box.size = math::Vec(); }