mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fixed paint of static stickers in userpic emoji builder.
This commit is contained in:
parent
b52948c1c0
commit
6fe930c19d
1 changed files with 9 additions and 1 deletions
|
@ -147,7 +147,15 @@ bool PreviewPainter::paintForeground(QPainter &p) {
|
|||
crl::now(),
|
||||
_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) {
|
||||
_player->markFrameShown();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue