| 545 | } |
| 546 | |
| 547 | IntCoord Window::_getActionScale(Widget* _widget) const |
| 548 | { |
| 549 | if (_widget->isUserString("Scale")) |
| 550 | { |
| 551 | IntCoord result = IntCoord::parse(_widget->getUserString("Scale")); |
| 552 | |
| 553 | if (result == IntCoord(1, 1, 0, 0) && !mMovable) |
| 554 | result.clear(); |
| 555 | |
| 556 | return result; |
| 557 | } |
| 558 | if (_widget->isUserString("Action")) |
| 559 | { |
| 560 | std::string_view action = _widget->getUserString("Action"); |
| 561 | if (action == "Move") |
| 562 | { |
| 563 | if (mMovable) |
| 564 | return {1, 1, 0, 0}; |
| 565 | return {}; |
| 566 | } |
| 567 | |
| 568 | IntCoord coord; |
| 569 | Align align = Align::parse(action); |
| 570 | |
| 571 | if (align.isLeft()) |
| 572 | { |
| 573 | coord.left = 1; |
| 574 | coord.width = -1; |
| 575 | } |
| 576 | else if (align.isRight()) |
| 577 | { |
| 578 | coord.width = 1; |
| 579 | } |
| 580 | |
| 581 | if (align.isTop()) |
| 582 | { |
| 583 | coord.top = 1; |
| 584 | coord.height = -1; |
| 585 | } |
| 586 | else if (align.isBottom()) |
| 587 | { |
| 588 | coord.height = 1; |
| 589 | } |
| 590 | |
| 591 | return coord; |
| 592 | } |
| 593 | |
| 594 | return {}; |
| 595 | } |
| 596 | |
| 597 | void Window::setMovable(bool _value) |
| 598 | { |
nothing calls this directly
no test coverage detected