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:
parent
5ed698ac69
commit
7fedf24d9e
|
@ -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);
|
auto thumbSize = (w > h) ? QSize(w * st::msgReplyBarSize.height() / h, st::msgReplyBarSize.height()) : QSize(st::msgReplyBarSize.height(), h * st::msgReplyBarSize.height() / w);
|
||||||
thumbSize *= cIntRetinaFactor();
|
thumbSize *= cIntRetinaFactor();
|
||||||
auto options = Images::Option::Smooth | (isRoundVideo() ? Images::Option::Circled : Images::Option::None);
|
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);
|
auto image = thumb->pixNoCache(thumbSize.width(), thumbSize.height(), options, outerSize, outerSize);
|
||||||
replyPreview = ImagePtr(image, "PNG");
|
replyPreview = ImagePtr(image, "PNG");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue