wip: refactor pt.29: 12 errors

This commit is contained in:
🪞👃🪞 2024-11-14 20:56:23 +01:00
parent ceead4131c
commit ab85a86b6b
27 changed files with 1890 additions and 1865 deletions

View file

@ -1,25 +1 @@
use crate::*;
pub trait StatusBar<E: Engine, S>: Widget<Engine = E> {
fn hotkey_fg () -> Color where Self: Sized;
fn update (&mut self, state: &S);
fn command (commands: &[[impl Widget<Engine = Tui>;3]])
-> impl Widget<Engine = Tui> + '_
where
Self: Sized
{
let hotkey_fg = Self::hotkey_fg();
Stack::right(move |add|{
Ok(for [a, b, c] in commands.iter() {
add(&row!(
" ",
widget(a),
widget(b).bold(true).fg(hotkey_fg),
widget(c),
))?;
})
})
}
}