diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index 0241da6b7..87d450196 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -4578,10 +4578,10 @@ void MentionsDropdown::recount(bool resetScroll) { if (h > _boundings.height()) h = _boundings.height(); if (h > maxh) h = maxh; if (width() != _boundings.width() || height() != h) { - setGeometry(0, _boundings.height() - h, _boundings.width(), h); + setGeometry(_boundings.x(), _boundings.y() + _boundings.height() - h, _boundings.width(), h); _scroll.resize(_boundings.width(), h); - } else if (y() != _boundings.height() - h) { - move(0, _boundings.height() - h); + } else if (y() != _boundings.y() + _boundings.height() - h) { + move(_boundings.x(), _boundings.y() + _boundings.height() - h); } if (resetScroll) st = 0; if (st != oldst) _scroll.scrollToY(st); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 80137d8ec..ee0d57ae8 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -6193,11 +6193,15 @@ void HistoryWidget::resizeEvent(QResizeEvent *e) { _field.move(_attachDocument.x() + _attachDocument.width(), height() - kbh - _field.height() - st::sendPadding); if (_pinnedBar) { - _scroll.move(0, st::replyHeight); + if (_scroll.y() != st::replyHeight) { + _scroll.move(0, st::replyHeight); + _attachMention.setBoundings(_scroll.geometry()); + } _pinnedBar->cancel.move(width() - _pinnedBar->cancel.width(), 0); _pinnedBar->shadow.setGeometry(0, st::replyHeight, width(), st::lineWidth); - } else { - _scroll.move(0, _pinnedBar ? st::replyHeight : 0); + } else if (_scroll.y() != 0) { + _scroll.move(0, 0); + _attachMention.setBoundings(_scroll.geometry()); } _attachDocument.move(0, height() - kbh - _attachDocument.height());