2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 08:05:12 +00:00

Fix edit media preview for Retina screen.

This commit is contained in:
John Preston
2019-04-03 23:26:10 +04:00
parent a058e75a6d
commit 7f598e358a

View File

@@ -386,11 +386,12 @@ void EditCaptionBox::updateEditPreview() {
if (!_doc) { if (!_doc) {
_thumb = App::pixmapFromImageInPlace( _thumb = App::pixmapFromImageInPlace(
file->preview.scaled(st::sendMediaPreviewSize, file->preview.scaled(
st::confirmMaxHeight, st::sendMediaPreviewSize * cIntRetinaFactor(),
st::confirmMaxHeight * cIntRetinaFactor(),
Qt::KeepAspectRatio)); Qt::KeepAspectRatio));
_thumbw = _thumb.width(); _thumbw = _thumb.width() / cIntRetinaFactor();
_thumbh = _thumb.height(); _thumbh = _thumb.height() / cIntRetinaFactor();
_thumbx = (st::boxWideWidth - _thumbw) / 2; _thumbx = (st::boxWideWidth - _thumbw) / 2;
} }
captionResized(); captionResized();