From 55859f3caaa1fe3ba25413b7a064512ea5a143de Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 13 Dec 2019 17:51:50 +0300 Subject: [PATCH] Fix layout regressions in login. --- Telegram/SourceFiles/intro/intro_step.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/intro/intro_step.cpp b/Telegram/SourceFiles/intro/intro_step.cpp index 681a5020a..0ad9d7da5 100644 --- a/Telegram/SourceFiles/intro/intro_step.cpp +++ b/Telegram/SourceFiles/intro/intro_step.cpp @@ -359,7 +359,8 @@ int Step::contentTop() const { auto result = (height() - st::introHeight) / 2; accumulate_max(result, st::introStepTopMin); if (_hasCover) { - auto added = 1. - snap(float64(height() - st::windowMinHeight) / (st::introStepHeightFull - st::windowMinHeight), 0., 1.); + const auto currentHeightFull = result + st::introNextTop + st::introContentTopAdd; + auto added = 1. - snap(float64(currentHeightFull - st::windowMinHeight) / (st::introStepHeightFull - st::windowMinHeight), 0., 1.); result += qRound(added * st::introContentTopAdd); } return result; @@ -409,6 +410,8 @@ void Step::prepareShowAnimated(Step *after) { } Step::CoverAnimation Step::prepareCoverAnimation(Step *after) { + Ui::SendPendingMoveResizeEvents(this); + auto result = CoverAnimation(); result.title = Ui::FlatLabel::CrossFade( after->_title,