2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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) {
_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();