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.

28 lines
411B

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