17f713cc1e576f43e00ce2085f65695cea08b568
- Author
- outfoxxed <outfoxxed@outfoxxed.me>
- Committer
- outfoxxed <outfoxxed@outfoxxed.me>
- Date
Message
Fix animation stutter from repeated updates in `updateAnimations`
Diff
1diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
2index 3f153898da4e5534a684d34609833ac3c6c2bfa9..1ba86295b4439e381a83b24d258a36193f73d5f1 100644
3--- a/src/TabGroup.cpp
4+++ b/src/TabGroup.cpp
5@@ -116,14 +116,14 @@ void Hy3TabBar::updateAnimations(bool warp) {
6 }
7
8 auto warp_init = entry->offset.goalf() == -1.0;
9- entry->offset = offset;
10+ if (entry->offset.goalf() != offset) entry->offset = offset;
11
12 if (warp_init) {
13 entry->offset.warp();
14 entry->width.setValueAndWarp(0.0);
15 }
16
17- entry->width = entry_width;
18+ if (entry->width.goalf() != entry_width) entry->width = entry_width;
19 offset += entry_width;
20
21 entry = std::next(entry);