diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index a43fb709c..36dc888f9 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -358,6 +358,9 @@ void Gif::draw(Painter &p, const PaintContext &context) const { usex = width() - usew; } } + if (isUnwrapped()) { + accumulate_min(usew, painth); + } if (rtl()) usex = width() - usex - usew; QRect rthumb(style::rtlrect(usex + paintx, painty, usew, painth, width())); @@ -844,6 +847,9 @@ TextState Gif::textState(QPoint point, StateRequest request) const { usex = width() - usew; } } + if (isUnwrapped()) { + accumulate_min(usew, painth); + } if (rtl()) usex = width() - usex - usew; if (via || reply || forwarded) {