| 556 | } |
| 557 | |
| 558 | void View::set_search_pos(uint64_t search_pos, bool hit) |
| 559 | { |
| 560 | QColor fore(QWidget::palette().color(QWidget::foregroundRole())); |
| 561 | fore.setAlpha(View::BackAlpha); |
| 562 | |
| 563 | const double time = search_pos * 1.0 / _session->cur_snap_samplerate(); |
| 564 | _search_pos = search_pos; |
| 565 | _search_hit = hit; |
| 566 | _search_cursor->set_index(search_pos); |
| 567 | _search_cursor->set_colour(hit ? View::Blue : fore); |
| 568 | |
| 569 | int width = get_view_width(); |
| 570 | assert(width); |
| 571 | |
| 572 | if (hit) { |
| 573 | set_scale_offset(_scale, (time / _scale) - (width / 2)); |
| 574 | _ruler->update(); |
| 575 | viewport_update(); |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | void View::normalize_layout() |
| 580 | { |
no test coverage detected