MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / startSlideAnimation

Method startSlideAnimation

Telegram/SourceFiles/dialogs/dialogs_widget.cpp:2505–2550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2503}
2504
2505void 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
2552bool Widget::floatPlayerHandleWheelEvent(QEvent *e) {
2553 return _scroll->viewportEvent(e);

Callers

nothing calls this directly

Calls 10

setToggledHiddenMethod · 0.80
setFinishedCallbackMethod · 0.80
setPixmapsMethod · 0.80
updateFunction · 0.50
hideMethod · 0.45
setDirectionMethod · 0.45
setRepaintCallbackMethod · 0.45
currentMethod · 0.45
progressMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected