| 2503 | } |
| 2504 | |
| 2505 | void Widget::startSlideAnimation( |
| 2506 | QPixmap oldContentCache, |
| 2507 | QPixmap newContentCache, |
| 2508 | Window::SlideDirection direction) { |
| 2509 | _scroll->hide(); |
| 2510 | if (_stories) { |
| 2511 | _stories->setToggledHidden(true, false); |
| 2512 | } |
| 2513 | _searchControls->hide(); |
| 2514 | if (_subsectionTopBar) { |
| 2515 | _subsectionTopBar->hide(); |
| 2516 | } |
| 2517 | if (_moreChatsBar) { |
| 2518 | _moreChatsBar->hide(); |
| 2519 | } |
| 2520 | if (_frozenAccountBar) { |
| 2521 | _frozenAccountBar->hide(); |
| 2522 | } |
| 2523 | if (_chatFilters) { |
| 2524 | _chatFilters->hide(); |
| 2525 | } |
| 2526 | if (_forumTopShadow) { |
| 2527 | _forumTopShadow->hide(); |
| 2528 | } |
| 2529 | if (_forumGroupCallBar) { |
| 2530 | _forumGroupCallBar->hide(); |
| 2531 | } |
| 2532 | if (_forumRequestsBar) { |
| 2533 | _forumRequestsBar->hide(); |
| 2534 | } |
| 2535 | if (_forumReportBar) { |
| 2536 | _forumReportBar->bar().hide(); |
| 2537 | } |
| 2538 | |
| 2539 | _showAnimation = std::make_unique<Window::SlideAnimation>(); |
| 2540 | _showAnimation->setDirection(direction); |
| 2541 | _showAnimation->setRepaintCallback([=] { |
| 2542 | if (_shownProgressValue.current() < 1.) { |
| 2543 | _shownProgressValue = _showAnimation->progress(); |
| 2544 | } |
| 2545 | update(); |
| 2546 | }); |
| 2547 | _showAnimation->setFinishedCallback([=] { slideFinished(); }); |
| 2548 | _showAnimation->setPixmaps(oldContentCache, newContentCache); |
| 2549 | _showAnimation->start(); |
| 2550 | } |
| 2551 | |
| 2552 | bool Widget::floatPlayerHandleWheelEvent(QEvent *e) { |
| 2553 | return _scroll->viewportEvent(e); |
nothing calls this directly
no test coverage detected