| 573 | void Layer::onRightToLeftChanged() {} |
| 574 | |
| 575 | void Layer::setFrame(const Rect& frame) { |
| 576 | if (_frame != frame) { |
| 577 | auto boundsChanged = (_frame.width() != frame.width()) || (_frame.height() != frame.height()); |
| 578 | _frame = frame; |
| 579 | |
| 580 | setVisualFrameDirty(); |
| 581 | |
| 582 | if (boundsChanged) { |
| 583 | setNeedsDisplay(); |
| 584 | onBoundsChanged(); |
| 585 | } else { |
| 586 | setChildNeedsDisplay(); |
| 587 | } |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | const Rect& Layer::getFrame() const { |
| 592 | return _frame; |