From b71a901182cf0c36382755ba5d2e255740507c10 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 May 2017 17:00:26 +0300 Subject: [PATCH] Round thumbs for round videos in shared links. --- Telegram/SourceFiles/overview/overview_layout.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp index 555fd33aa..3ed28ab21 100644 --- a/Telegram/SourceFiles/overview/overview_layout.cpp +++ b/Telegram/SourceFiles/overview/overview_layout.cpp @@ -1139,7 +1139,8 @@ void Link::paint(Painter &p, const QRect &clip, TextSelection selection, const P } p.drawPixmapLeft(0, top, _width, pix); } else if (_page && _page->document && !_page->document->thumb->isNull()) { - p.drawPixmapLeft(0, top, _width, _page->document->thumb->pixSingle(_pixw, _pixh, st::linksPhotoSize, st::linksPhotoSize, ImageRoundRadius::Small)); + auto roundRadius = _page->document->isRoundVideo() ? ImageRoundRadius::Ellipse : ImageRoundRadius::Small; + p.drawPixmapLeft(0, top, _width, _page->document->thumb->pixSingle(_pixw, _pixh, st::linksPhotoSize, st::linksPhotoSize, roundRadius)); } else { int32 index = _letter.isEmpty() ? 0 : (_letter.at(0).unicode() % 4); switch (index) {