Fix stickers panel on Retina screens.

This commit is contained in:
John Preston 2020-05-25 18:16:56 +04:00
parent 9ce59730ff
commit 24fed8105c

View File

@ -798,6 +798,7 @@ void StickersListWidget::Footer::paintSetIcon(
const auto size = frame.size() / cIntRetinaFactor(); const auto size = frame.size() / cIntRetinaFactor();
if (icon.savedFrame.isNull()) { if (icon.savedFrame.isNull()) {
icon.savedFrame = QPixmap::fromImage(frame, Qt::ColorOnly); icon.savedFrame = QPixmap::fromImage(frame, Qt::ColorOnly);
icon.savedFrame.setDevicePixelRatio(cRetinaFactor());
} }
p.drawImage( p.drawImage(
QRect( QRect(
@ -1850,6 +1851,7 @@ void StickersListWidget::paintSticker(Painter &p, Set &set, int y, int section,
frame); frame);
if (sticker.savedFrame.isNull()) { if (sticker.savedFrame.isNull()) {
sticker.savedFrame = QPixmap::fromImage(frame, Qt::ColorOnly); sticker.savedFrame = QPixmap::fromImage(frame, Qt::ColorOnly);
sticker.savedFrame.setDevicePixelRatio(cRetinaFactor());
} }
set.lottiePlayer->unpause(sticker.animated); set.lottiePlayer->unpause(sticker.animated);
} else { } else {