| 551 | } |
| 552 | |
| 553 | std::pair<wxRect, bool> |
| 554 | AdornedRulerPanel::ScrubbingRulerOverlay::DoGetRectangle(wxSize /*size*/) |
| 555 | { |
| 556 | Update(); |
| 557 | |
| 558 | const auto x = mOldQPIndicatorPos; |
| 559 | if (x >= 0) { |
| 560 | // These dimensions are always sufficient, even if a little |
| 561 | // excessive for the small triangle: |
| 562 | const int width = IndicatorBigWidth() * 3 / 2; |
| 563 | //const auto height = IndicatorHeightForWidth(width); |
| 564 | |
| 565 | const int indsize = width / 2; |
| 566 | |
| 567 | auto xx = x - indsize; |
| 568 | auto yy = 0; |
| 569 | return { |
| 570 | { xx, yy, |
| 571 | indsize * 2 + 1, |
| 572 | GetRuler()->GetSize().GetHeight() }, |
| 573 | (x != mNewQPIndicatorPos |
| 574 | || (mOldScrub != mNewScrub) |
| 575 | || (mOldSeek != mNewSeek) ) |
| 576 | }; |
| 577 | } |
| 578 | else |
| 579 | return { {}, mNewQPIndicatorPos >= 0 }; |
| 580 | } |
| 581 | |
| 582 | void AdornedRulerPanel::ScrubbingRulerOverlay::Draw( |
| 583 | OverlayPanel & /*panel*/, wxDC &dc) |
nothing calls this directly
no test coverage detected