2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 16:15:13 +00:00

Fix video message and sticker reply preview on Retina.

Wrong preview image size was a reason for image resize before
drawing the preview and it caused black background, not transparent.
This commit is contained in:
John Preston
2017-04-30 19:58:31 +03:00
parent 5ed698ac69
commit 7fedf24d9e

View File

@@ -1758,7 +1758,7 @@ ImagePtr DocumentData::makeReplyPreview() {
auto thumbSize = (w > h) ? QSize(w * st::msgReplyBarSize.height() / h, st::msgReplyBarSize.height()) : QSize(st::msgReplyBarSize.height(), h * st::msgReplyBarSize.height() / w);
thumbSize *= cIntRetinaFactor();
auto options = Images::Option::Smooth | (isRoundVideo() ? Images::Option::Circled : Images::Option::None);
auto outerSize = st::msgReplyBarSize.height() * cIntRetinaFactor();
auto outerSize = st::msgReplyBarSize.height();
auto image = thumb->pixNoCache(thumbSize.width(), thumbSize.height(), options, outerSize, outerSize);
replyPreview = ImagePtr(image, "PNG");
} else {