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.

21 lines
292B

  1. #include <ui/MarginLayout.hpp>
  2. #include <vector>
  3. namespace rack {
  4. namespace ui {
  5. void MarginLayout::step() {
  6. Widget::step();
  7. math::Rect childBox = box.zeroPos().grow(margin.neg());
  8. for (Widget* child : children) {
  9. child->box = childBox;
  10. }
  11. }
  12. } // namespace ui
  13. } // namespace rack