move cpu indicator into status bar

This commit is contained in:
🪞👃🪞 2024-11-25 19:26:51 +01:00
parent 935b5b7720
commit b2386b2992
3 changed files with 26 additions and 19 deletions

View file

@ -293,7 +293,7 @@ pub trait FocusWrap<T> {
}
}
pub trait StatusBar: Copy + Widget<Engine = Tui> {
pub trait StatusBar: Widget<Engine = Tui> {
type State;
fn hotkey_fg () -> Color where Self: Sized;
fn update (&mut self, state: &Self::State) where Self: Sized;
@ -314,6 +314,12 @@ pub trait StatusBar: Copy + Widget<Engine = Tui> {
})
})
}
fn with <'a> (state: &'a Self::State, content: impl Widget<Engine=Tui>) -> impl Widget<Engine=Tui>
where Self: Sized, &'a Self::State: Into<Self>
{
Split::up(1, state.into(), content)
}
}
fn content_with_menu_and_status <'a, A, S, C> (