feat(ui-gpui): render-driven pulse via request_animation_frame() (GPUI native)
This commit is contained in:
parent
57e0e3a087
commit
573105eae6
2 changed files with 21 additions and 35 deletions
|
|
@ -88,6 +88,7 @@ impl ProjectBox {
|
|||
|
||||
/// Initialize sub-views. Must be called after the ProjectBox entity is created.
|
||||
pub fn init_subviews(&mut self, cx: &mut Context<Self>) {
|
||||
eprintln!("[ProjectBox] init_subviews for {}", self.project.name);
|
||||
// Create pulsing status dot
|
||||
let dot_status = match self.project.agent.status {
|
||||
AgentStatus::Running => DotStatus::Running,
|
||||
|
|
@ -95,10 +96,8 @@ impl ProjectBox {
|
|||
AgentStatus::Done => DotStatus::Done,
|
||||
AgentStatus::Error => DotStatus::Error,
|
||||
};
|
||||
let status_dot = cx.new(|cx: &mut Context<PulsingDot>| {
|
||||
let dot = PulsingDot::new(dot_status, 8.0);
|
||||
dot.start_animation(cx);
|
||||
dot
|
||||
let status_dot = cx.new(|_cx: &mut Context<PulsingDot>| {
|
||||
PulsingDot::new(dot_status, 8.0)
|
||||
});
|
||||
self.status_dot = Some(status_dot);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue