#pragma once #include #include #include #include #include namespace rack { namespace app { struct PanelBorder : widget::TransparentWidget { void draw(const DrawArgs& args) override; }; struct SvgPanel : widget::Widget { widget::FramebufferWidget* fb; widget::SvgWidget* sw; PanelBorder* panelBorder; std::shared_ptr svg; SvgPanel(); void step() override; void setBackground(std::shared_ptr svg); }; DEPRECATED typedef SvgPanel SVGPanel; struct ThemedSvgPanel : SvgPanel { std::shared_ptr lightSvg; std::shared_ptr darkSvg; void setBackground(std::shared_ptr lightSvg, std::shared_ptr darkSvg) { this->lightSvg = lightSvg; this->darkSvg = darkSvg; SvgPanel::setBackground(settings::preferDarkPanels ? darkSvg : lightSvg); } void step() override { SvgPanel::setBackground(settings::preferDarkPanels ? darkSvg : lightSvg); SvgPanel::step(); } }; } // namespace app } // namespace rack