new rendering engine

This commit is contained in:
2026-06-19 02:55:33 +02:00
parent 0a90d6a5d7
commit 81a4167382
53 changed files with 1668 additions and 378 deletions

View File

@@ -27,7 +27,7 @@ pub async fn run(
let mut widget_states = Vec::new();
for w in &widgets {
if let Some(s) = projection.get_state(w.id).await {
widget_states.push((w.id, s));
widget_states.push((w.id, w.display_hint.clone(), s));
}
}

View File

@@ -130,8 +130,15 @@ async fn poll_loop(
.await;
if !changed.is_empty() {
let with_hints: Vec<_> = changed
.iter()
.filter_map(|(id, state)| {
let hint = widgets.iter().find(|w| w.id == *id)?.display_hint.clone();
Some((*id, hint, state.clone()))
})
.collect();
if let Some(l) = &layout
&& let Err(e) = broadcaster.push_screen_update(l, &changed).await
&& let Err(e) = broadcaster.push_screen_update(l, &with_hints).await
{
warn!(error = %e, "failed to push update");
}