From 762589b6221a65886872906dd228c6836f7580df Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 3 Feb 2023 09:50:48 +0400 Subject: [PATCH] Fix userpic in a notification with hidden sender. --- .../SourceFiles/window/notifications_manager_default.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 382bf2355..15279204d 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -100,13 +100,14 @@ Manager::QueuedNotification::QueuedNotification(NotificationFields &&fields) QPixmap Manager::hiddenUserpicPlaceholder() const { if (_hiddenUserpicPlaceholder.isNull()) { + const auto ratio = style::DevicePixelRatio(); _hiddenUserpicPlaceholder = Ui::PixmapFromImage( LogoNoMargin().scaled( - st::notifyPhotoSize, - st::notifyPhotoSize, + st::notifyPhotoSize * ratio, + st::notifyPhotoSize * ratio, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); - _hiddenUserpicPlaceholder.setDevicePixelRatio(cRetinaFactor()); + _hiddenUserpicPlaceholder.setDevicePixelRatio(ratio); } return _hiddenUserpicPlaceholder; }