| 591 | } |
| 592 | |
| 593 | void Button::updateContentSize() |
| 594 | { |
| 595 | if (_unifySize) |
| 596 | { |
| 597 | if (_scale9Enabled) |
| 598 | { |
| 599 | ProtectedNode::setContentSize(_customSize); |
| 600 | } |
| 601 | else |
| 602 | { |
| 603 | Vec2 s = getNormalSize(); |
| 604 | ProtectedNode::setContentSize(s); |
| 605 | } |
| 606 | onSizeChanged(); |
| 607 | return; |
| 608 | } |
| 609 | |
| 610 | if (_ignoreSize) |
| 611 | { |
| 612 | this->setContentSize(getVirtualRendererSize()); |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | void Button::onSizeChanged() |
| 617 | { |
no test coverage detected