wip: fixing Bsp

This commit is contained in:
🪞👃🪞 2025-01-01 17:26:54 +01:00
parent d17d20e7db
commit 8454b95df8
2 changed files with 56 additions and 67 deletions

View file

@ -88,6 +88,12 @@ impl TransportView {
}
}
}
pub struct PlayPause(pub bool);
render!(Tui: (self: PlayPause) => Tui::bg(
if self.0{Color::Rgb(0,128,0)}else{Color::Rgb(128,64,0)},
Fixed::x(5, Tui::either(self.0,
Tui::fg(Color::Rgb(0, 255, 0), Bsp::s(" 🭍🭑🬽 ", " 🭞🭜🭘 ",)),
Tui::fg(Color::Rgb(255, 128, 0), Bsp::s(" ▗▄▖ ", " ▝▀▘ ",))))));
render!(Tui: (self: TransportView) => {
let color = self.color;
//let transport_field = move|label, value|row!(
@ -109,12 +115,6 @@ render!(Tui: (self: TransportView) => {
)),
)))*/
});
pub struct PlayPause(pub bool);
render!(Tui: (self: PlayPause) => Tui::bg(
if self.0{Color::Rgb(0,128,0)}else{Color::Rgb(128,64,0)},
Fixed::x(5, Tui::either(self.0,
Tui::fg(Color::Rgb(0, 255, 0), Bsp::s(" 🭍🭑🬽 ", " 🭞🭜🭘 ",)),
Tui::fg(Color::Rgb(255, 128, 0), Bsp::s(" ▗▄▖ ", " ▝▀▘ ",))))));
impl HasFocus for TransportTui {
type Item = TransportFocus;
fn focused (&self) -> Self::Item {