show hotkeys in status bar

This commit is contained in:
🪞👃🪞 2024-11-28 13:14:47 +01:00
parent 51889d4b43
commit 86649ef994
3 changed files with 53 additions and 15 deletions

View file

@ -29,9 +29,15 @@ impl Content for SequencerStatusBar {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
let orange = Color::Rgb(255,128,0);
let yellow = Color::Rgb(255,255,0);
let black = Color::Rgb(0,0,0);
lay!(
widget(&self.mode).bg(orange).fg(black).bold(true),
row!(
widget(&self.mode).bg(orange).fg(black).bold(true),
row!((prefix, hotkey, suffix) in self.help => {
row!(" ", *prefix, TuiStyle::fg(*hotkey, yellow), *suffix)
})
),
row!(
widget(&self.cpu).fg(orange),
widget(&self.res).fg(orange),