smooth anim

This commit is contained in:
Jeremy Rose
2025-08-13 15:28:10 -07:00
parent 4e3384eed2
commit 563787204e
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ pub(crate) fn shimmer_spans(text: &str) -> Vec<Span<'static>> {
// Use time-based sweep synchronized to process start.
let padding = 10usize;
let period = chars.len() + padding * 2;
let sweep_seconds = 2.5f32;
let sweep_seconds = 2.0f32;
let pos_f =
(elapsed_since_start().as_secs_f32() % sweep_seconds) / sweep_seconds * (period as f32);
let pos = pos_f as usize;

View File

@@ -154,7 +154,7 @@ impl WidgetRef for StatusIndicatorWidget {
// Schedule next animation frame.
self.app_event_tx
.send(AppEvent::ScheduleFrameIn(Duration::from_millis(100)));
.send(AppEvent::ScheduleFrameIn(Duration::from_millis(32)));
let idx = self.current_frame();
let elapsed = self.start_time.elapsed().as_secs();
let shown_now = self.current_shown_len(idx);