From 7f598e358ae648e4b42ae040dedb0d12ea904213 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 3 Apr 2019 23:26:10 +0400 Subject: [PATCH] Fix edit media preview for Retina screen. --- Telegram/SourceFiles/boxes/edit_caption_box.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/boxes/edit_caption_box.cpp b/Telegram/SourceFiles/boxes/edit_caption_box.cpp index 0cab597a8b..1eda77c69b 100644 --- a/Telegram/SourceFiles/boxes/edit_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_caption_box.cpp @@ -386,11 +386,12 @@ void EditCaptionBox::updateEditPreview() { if (!_doc) { _thumb = App::pixmapFromImageInPlace( - file->preview.scaled(st::sendMediaPreviewSize, - st::confirmMaxHeight, + file->preview.scaled( + st::sendMediaPreviewSize * cIntRetinaFactor(), + st::confirmMaxHeight * cIntRetinaFactor(), Qt::KeepAspectRatio)); - _thumbw = _thumb.width(); - _thumbh = _thumb.height(); + _thumbw = _thumb.width() / cIntRetinaFactor(); + _thumbh = _thumb.height() / cIntRetinaFactor(); _thumbx = (st::boxWideWidth - _thumbw) / 2; } captionResized();