| 6 | |
| 7 | |
| 8 | SvgPort::SvgPort() { |
| 9 | fb = new widget::FramebufferWidget; |
| 10 | addChild(fb); |
| 11 | |
| 12 | shadow = new CircularShadow; |
| 13 | fb->addChild(shadow); |
| 14 | // Avoid breakage if plugins fail to call setSvg() |
| 15 | // In that case, just disable the shadow. |
| 16 | shadow->box.size = math::Vec(); |
| 17 | |
| 18 | sw = new widget::SvgWidget; |
| 19 | fb->addChild(sw); |
| 20 | } |
| 21 | |
| 22 | void SvgPort::setSvg(std::shared_ptr<window::Svg> svg) { |
| 23 | if (svg == sw->svg) |