add --bpm flag

This commit is contained in:
🪞👃🪞 2025-01-02 16:38:04 +01:00
parent 42e2ef2a50
commit 94491a323a
11 changed files with 78 additions and 57 deletions

22
src/field.rs Normal file
View file

@ -0,0 +1,22 @@
use crate::*;
pub struct Field<T, U>(pub ItemPalette, pub T, pub U)
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync;
impl<T, U> Content<Tui> for Field<T, U>
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync
{
fn content (&self) -> impl Content<Tui> {
row!(
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.darker.rgb, "")),
Tui::bg(self.0.darker.rgb, Tui::fg(self.0.lighter.rgb,
Tui::bold(true, format!("{}", self.1.as_ref())))),
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.darker.rgb, "")),
Tui::bg(self.0.darkest.rgb, Tui::fg(self.0.lightest.rgb,
format!("{} ", self.2.as_ref())))
)
}
}