mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
smooth anim
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user