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
1 changed files with 5 additions and 4 deletions

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();