From dcebefe2bbc5a62ac9fa68b6ae78e2c9419b0b9a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 16 Feb 2021 18:30:58 +0400 Subject: [PATCH] Fix layout of round video messages. --- Telegram/SourceFiles/history/view/media/history_view_gif.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index 334c6b893..a95e45df2 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -155,11 +155,11 @@ QSize Gif::countOptimalSize() { _thumbh = th; auto maxWidth = qMax(tw, st::minPhotoSize); auto minHeight = qMax(th, st::minPhotoSize); - accumulate_max(maxWidth, _parent->minWidthForMedia()); if (!activeCurrentStreamed()) { accumulate_max(maxWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x())); } if (_parent->hasBubble()) { + accumulate_max(maxWidth, _parent->minWidthForMedia()); if (!_caption.isEmpty()) { auto captionw = maxWidth - st::msgPadding.left() - st::msgPadding.right(); minHeight += st::mediaCaptionSkip + _caption.countHeight(captionw); @@ -212,11 +212,11 @@ QSize Gif::countCurrentSize(int newWidth) { newWidth = qMax(tw, st::minPhotoSize); auto newHeight = qMax(th, st::minPhotoSize); - accumulate_max(newWidth, _parent->minWidthForMedia()); if (!activeCurrentStreamed()) { accumulate_max(newWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x())); } if (_parent->hasBubble()) { + accumulate_max(newWidth, _parent->minWidthForMedia()); if (!_caption.isEmpty()) { auto captionw = newWidth - st::msgPadding.left() - st::msgPadding.right(); newHeight += st::mediaCaptionSkip + _caption.countHeight(captionw);