Fixed paint of static stickers in userpic emoji builder.
This commit is contained in:
parent
b52948c1c0
commit
6fe930c19d
|
@ -147,7 +147,15 @@ bool PreviewPainter::paintForeground(QPainter &p) {
|
||||||
crl::now(),
|
crl::now(),
|
||||||
_paused);
|
_paused);
|
||||||
|
|
||||||
p.drawImage(_frameRect, frame.image);
|
if (frame.image.width() == frame.image.height()) {
|
||||||
|
p.drawImage(_frameRect, frame.image);
|
||||||
|
} else {
|
||||||
|
auto frameRect = Rect(frame.image.size().scaled(
|
||||||
|
_frameRect.size(),
|
||||||
|
Qt::KeepAspectRatio));
|
||||||
|
frameRect.moveCenter(_frameRect.center());
|
||||||
|
p.drawImage(frameRect, frame.image);
|
||||||
|
}
|
||||||
if (!_paused) {
|
if (!_paused) {
|
||||||
_player->markFrameShown();
|
_player->markFrameShown();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue