This commit is contained in:
John Preston 2016-10-17 13:56:29 +03:00
commit eb939fa4b0

View File

@ -61,9 +61,10 @@ void PhotoCropBox::init(const QImage &img, PeerData *peer) {
} }
int32 s = st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(); int32 s = st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right();
_thumb = App::pixmapFromImageInPlace(img.scaled(s, s, Qt::KeepAspectRatio, Qt::SmoothTransformation)); _thumb = App::pixmapFromImageInPlace(img.scaled(s * cIntRetinaFactor(), s * cIntRetinaFactor(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
_thumbw = _thumb.width(); _thumb.setDevicePixelRatio(cRetinaFactor());
_thumbh = _thumb.height(); _thumbw = _thumb.width() / cIntRetinaFactor();
_thumbh = _thumb.height() / cIntRetinaFactor();
if (_thumbw > _thumbh) { if (_thumbw > _thumbh) {
_cropw = _thumbh - 20; _cropw = _thumbh - 20;
} else { } else {