mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Paint last empty frame in sticker effects.
This commit is contained in:
parent
6f285874f3
commit
ee793a2c59
2 changed files with 10 additions and 3 deletions
|
@ -266,12 +266,18 @@ void EmojiInteractions::paint(QPainter &p) {
|
|||
play.framesCount = information.framesCount;
|
||||
play.frameRate = information.frameRate;
|
||||
}
|
||||
if (play.frame + 1 == play.framesCount) {
|
||||
const auto rect = computeRect(
|
||||
play.view,
|
||||
play.premium).translated(play.shift);
|
||||
if (play.started && !play.frame) {
|
||||
play.finished = true;
|
||||
_updateRequests.fire_copy(rect);
|
||||
continue;
|
||||
} else if (play.frame > 0) {
|
||||
play.started = true;
|
||||
}
|
||||
const auto rect = computeRect(play.view, play.premium);
|
||||
p.drawImage(
|
||||
QRect(rect.topLeft() + play.shift, frame.image.size() / factor),
|
||||
QRect(rect.topLeft(), frame.image.size() / factor),
|
||||
frame.image);
|
||||
play.lottie->markFrameShown();
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ private:
|
|||
int framesCount = 0;
|
||||
int frameRate = 0;
|
||||
bool premium = false;
|
||||
bool started = false;
|
||||
bool finished = false;
|
||||
};
|
||||
struct Delayed {
|
||||
|
|
Loading…
Add table
Reference in a new issue