mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix animation stutter from repeated updates in updateAnimations
This commit is contained in:
parent
afc8640583
commit
17f713cc1e
1 changed files with 2 additions and 2 deletions
|
@ -116,14 +116,14 @@ void Hy3TabBar::updateAnimations(bool warp) {
|
|||
}
|
||||
|
||||
auto warp_init = entry->offset.goalf() == -1.0;
|
||||
entry->offset = offset;
|
||||
if (entry->offset.goalf() != offset) entry->offset = offset;
|
||||
|
||||
if (warp_init) {
|
||||
entry->offset.warp();
|
||||
entry->width.setValueAndWarp(0.0);
|
||||
}
|
||||
|
||||
entry->width = entry_width;
|
||||
if (entry->width.goalf() != entry_width) entry->width = entry_width;
|
||||
offset += entry_width;
|
||||
|
||||
entry = std::next(entry);
|
||||
|
|
Loading…
Add table
Reference in a new issue