From de6b46075465c5600812fcb20324ddb459d9062d Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 13 Dec 2020 20:12:34 +0300 Subject: [PATCH] Fixed visual glitch in Replies section with tall input field. --- .../view/controls/history_view_compose_controls.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index 76ba6c160..3bea246b3 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -1639,7 +1639,15 @@ void ComposeControls::updateControlsGeometry(QSize size) { - _send->width() - _tabbedSelectorToggle->width() - (_botCommandShown ? _botCommandStart->width() : 0); - _field->resizeToWidth(fieldWidth); + { + const auto oldFieldHeight = _field->height(); + _field->resizeToWidth(fieldWidth); + // If a height of the field is changed + // then this method will be called with the updated size. + if (oldFieldHeight != _field->height()) { + return; + } + } const auto buttonsTop = size.height() - _attachToggle->height();