From 7bf557971e03ec101cb1d813a93828a1a421fbf4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 30 Nov 2021 20:19:23 +0400 Subject: [PATCH] Fix "Send As" button on Retina screens. --- Telegram/SourceFiles/ui/controls/send_as_button.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/ui/controls/send_as_button.cpp b/Telegram/SourceFiles/ui/controls/send_as_button.cpp index b9a1241769..062350541c 100644 --- a/Telegram/SourceFiles/ui/controls/send_as_button.cpp +++ b/Telegram/SourceFiles/ui/controls/send_as_button.cpp @@ -18,7 +18,6 @@ SendAsButton::SendAsButton(QWidget *parent, const style::SendAsButton &st) resize(_st.width, _st.height); } - void SendAsButton::setUserpic(QImage userpic) { _userpic = std::move(userpic); update(); @@ -44,7 +43,7 @@ void SendAsButton::paintEvent(QPaintEvent *e) { const auto active = _activeAnimation.value(_active ? 1. : 0.); if (active < 1. && !_userpic.isNull()) { - p.drawImage(left, top, _userpic); + p.drawImage(QRect(left, top, _st.size, _st.size), _userpic); } if (active > 0.) { p.setOpacity(active);