From c86496add1fa7ea016b2515ba6904fd9f5d1fc57 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 19 Oct 2022 11:11:12 +0400 Subject: [PATCH] Fix document thumbnails on Retina screens. --- .../SourceFiles/history/view/media/history_view_document.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_document.cpp index 2134e9b56..51f7802c7 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_document.cpp @@ -736,7 +736,8 @@ void Document::validateThumbnail( } const auto small = (rounding == Ui::BubbleRounding()); auto image = normal ? normal : blurred; - auto thumbnail = Images::Prepare(image->original(), thumbed->thumbw, { + const auto imageWidth = thumbed->thumbw * style::DevicePixelRatio(); + auto thumbnail = Images::Prepare(image->original(), imageWidth, { .options = (normal ? Images::Option() : Images::Option::Blur) | (small ? Images::Option::RoundSmall : Images::Option()), .outer = outer,