mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
add --bpm flag
This commit is contained in:
parent
42e2ef2a50
commit
94491a323a
11 changed files with 78 additions and 57 deletions
|
|
@ -7,14 +7,8 @@ pub struct PhraseSelector {
|
|||
pub(crate) time: String,
|
||||
}
|
||||
|
||||
// TODO: Display phrases always in order of appearance
|
||||
render!(Tui: (self: PhraseSelector) => Fixed::xy(24, 1, row!(
|
||||
Tui::fg(self.color.lightest.rgb, Tui::bold(true, &self.title)),
|
||||
Tui::fg_bg(self.color.lighter.rgb, self.color.base.rgb, row!(
|
||||
format!("{:8}", &self.name[0..8.min(self.name.len())]),
|
||||
Tui::bg(self.color.dark.rgb, &self.time),
|
||||
)),
|
||||
)));
|
||||
render!(Tui: (self: PhraseSelector) =>
|
||||
Field(self.color, self.title, format!("{} {}", self.time, self.name)));
|
||||
|
||||
impl PhraseSelector {
|
||||
|
||||
|
|
@ -31,7 +25,7 @@ impl PhraseSelector {
|
|||
} else {
|
||||
String::from(" ")
|
||||
};
|
||||
Self { title: "Now:|", time, name, color, }
|
||||
Self { title: "Now", time, name, color, }
|
||||
}
|
||||
|
||||
// beats until switchover
|
||||
|
|
@ -59,7 +53,7 @@ impl PhraseSelector {
|
|||
} else {
|
||||
(" ".into(), " ".into(), TuiTheme::g(64).into())
|
||||
};
|
||||
Self { title: " Next|", time, name, color, }
|
||||
Self { title: "Next", time, name, color, }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue