Improve chats expand animation.

Fixes #25890.
This commit is contained in:
John Preston 2023-08-15 16:50:35 +02:00
parent 4e95d62018
commit 3fe9ba41ba
1 changed files with 6 additions and 1 deletions

View File

@ -1446,6 +1446,8 @@ void Widget::startWidthAnimation() {
st::columnMinimalWidthLeft,
scrollGeometry.height());
_scroll->setGeometry(grabGeometry);
_inner->resize(st::columnMinimalWidthLeft, _inner->height());
_inner->setNarrowRatio(0.);
Ui::SendPendingMoveResizeEvents(_scroll);
auto image = QImage(
grabGeometry.size() * cIntRetinaFactor(),
@ -1457,7 +1459,10 @@ void Widget::startWidthAnimation() {
Ui::RenderWidget(p, _scroll);
}
_widthAnimationCache = Ui::PixmapFromImage(std::move(image));
_scroll->setGeometry(scrollGeometry);
if (scrollGeometry != grabGeometry) {
_scroll->setGeometry(scrollGeometry);
updateControlsGeometry();
}
_scroll->hide();
updateStoriesVisibility();
}