You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
362B

  1. #include "ui/IconButton.hpp"
  2. namespace rack {
  3. IconButton::IconButton() {
  4. box.size.x = BND_TOOL_WIDTH;
  5. fw = new FramebufferWidget;
  6. fw->oversample = 2;
  7. addChild(fw);
  8. sw = new SVGWidget;
  9. sw->box.pos = math::Vec(2, 2);
  10. fw->addChild(sw);
  11. }
  12. void IconButton::setSVG(std::shared_ptr<SVG> svg) {
  13. sw->setSVG(svg);
  14. fw->dirty = true;
  15. }
  16. } // namespace rack