mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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(),
|
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…
Add table
Reference in a new issue