getting there, painstakingly 😄

This commit is contained in:
🪞👃🪞 2025-03-16 03:58:53 +02:00
parent 70ad0b343b
commit a4f0487324
4 changed files with 180 additions and 276 deletions

View file

@ -140,12 +140,12 @@ pub(crate) fn io_conns <'a, T: PortsSizes<'a>> (
Fill::x(Align::w(Tui::bold(false, wrap(bg, fg, Fill::x(""))))))))))
}
pub(crate) fn per_track_top <'a, T: Content<TuiOut> + 'a> (
pub(crate) fn per_track_top <'a, T: Content<TuiOut> + 'a, U: TracksSizes<'a>> (
width: u16,
tracks: impl TracksSizes<'a>,
tracks: impl Fn() -> U + Send + Sync + 'a,
callback: impl Fn(usize, &'a Track)->T + Send + Sync + 'a
) -> impl Content<TuiOut> + 'a {
Align::x(Tui::bg(Reset, Map::new(||tracks, move|(index, track, x1, x2), _|{
Align::x(Tui::bg(Reset, Map::new(tracks, move|(index, track, x1, x2), _|{
let width = (x2 - x1) as u16;
map_east(x1 as u16, width, Fixed::x(width, Tui::fg_bg(
track.color.lightest.rgb,