mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
QtLottie: Fix precomp layer start time.
This commit is contained in:
parent
2c422dcd73
commit
3f1ec52e6c
2 changed files with 6 additions and 4 deletions
|
@ -80,10 +80,12 @@ QImage Animation::frame(crl::time now) const {
|
||||||
|
|
||||||
const auto position = now;
|
const auto position = now;
|
||||||
const auto elapsed = int((_scene->frameRate() * position + 500) / 1000);
|
const auto elapsed = int((_scene->frameRate() * position + 500) / 1000);
|
||||||
const auto frames = (_scene->endFrame() - _scene->startFrame());
|
const auto from = _scene->startFrame();
|
||||||
|
const auto till = _scene->endFrame();
|
||||||
|
const auto frames = (till - from);
|
||||||
const auto frame = _options.loop
|
const auto frame = _options.loop
|
||||||
? (_scene->startFrame() + (elapsed % frames))
|
? (from + (elapsed % frames))
|
||||||
: std::min(_scene->startFrame() + elapsed, _scene->endFrame());
|
: std::min(from + elapsed, till);
|
||||||
|
|
||||||
_scene->updateProperties(frame);
|
_scene->updateProperties(frame);
|
||||||
|
|
||||||
|
|
2
Telegram/ThirdParty/qtlottie
vendored
2
Telegram/ThirdParty/qtlottie
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit bfc7dc4606bbba1f5c42f4868e39b48e4b5764b5
|
Subproject commit 9162dace0879b9190cefac0468c4dc4f92579488
|
Loading…
Add table
Reference in a new issue