From 183762b88ccc52d0ca83a5ba2934f4a4ee129655 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Tue, 29 Dec 2020 04:32:43 +0300 Subject: [PATCH] Fix userpics in calls top bar --- Telegram/SourceFiles/data/data_peer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/data/data_peer.cpp b/Telegram/SourceFiles/data/data_peer.cpp index 6dbe3fe82..6a93f95ad 100644 --- a/Telegram/SourceFiles/data/data_peer.cpp +++ b/Telegram/SourceFiles/data/data_peer.cpp @@ -376,7 +376,12 @@ QPixmap PeerData::genUserpic( std::shared_ptr &view, int size) const { if (const auto userpic = currentUserpic(view)) { - return userpic->pixCircled(size, size); + switch (cUserpicCornersType()) { + case 0: return userpic->pixRounded(size, size, ImageRoundRadius::None); + case 1: return userpic->pixRounded(size, size, ImageRoundRadius::Small); + case 2: return userpic->pixRounded(size, size, ImageRoundRadius::Large); + default: return userpic->pixCircled(size, size); + } } auto result = QImage(QSize(size, size) * cIntRetinaFactor(), QImage::Format_ARGB32_Premultiplied); result.setDevicePixelRatio(cRetinaFactor());