Fix animation stutter from repeated updates in updateAnimations

This commit is contained in:
outfoxxed 2023-05-27 02:29:00 -07:00
parent afc8640583
commit 17f713cc1e
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -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);