fix misalignment in input/output rows

This commit is contained in:
🪞👃🪞 2025-01-25 19:53:12 +01:00
parent 7a97b07c0a
commit 821f373bd2

View file

@ -236,11 +236,11 @@ impl Tek {
let width = self.size.w();
let filter = move|(t, track, x1, x2)|if x2 >= width {None} else {Some((t, track, x1, x2))};
let tracks = move||self.tracks_sizes(self.is_editing(), self.editor_w()).map_while(filter);
Fill::xy(Align::nw(Map::new(tracks, move|(index, track, x1, x2), _|{
Map::new(tracks, move|(index, track, x1, x2), _|{
let width = (x2 - x1) as u16;
let content = Fixed::y(1, f(index, track));
let styled = Tui::fg_bg(track.color.lightest.rgb, track.color.base.rgb, content);
map_east(x1 as u16, width, Fixed::x(width, Align::n(styled))) })))
map_east(x1 as u16, width, Fixed::x(width, styled)) })
}
fn wrap (bg: Color, fg: Color, content: impl Content<TuiOut>) -> impl Content<TuiOut> {
Bsp::e(Tui::fg_bg(bg, Reset, ""), Bsp::w(Tui::fg_bg(bg, Reset, ""), Tui::fg_bg(fg, bg, content)))
@ -348,7 +348,7 @@ impl Tek {
Tui::fg_bg(if mon { White } else { track.color.darkest.rgb }, bg, "M▞▞▞▞"))))))))});
Bsp::s(
Tui::bg(Black, self.row_top(self.w(), self.h_inputs(), header, Tui::bg(Red, cells))),
Tui::bg(Black, self.row_top(self.w(), self.h_inputs(), "Into:", self.per_track_top(|_, _|" --- ")))
Tui::bg(Black, self.row_top(self.w(), 1, "Into:", self.per_track_top(|_, _|" --- ")))
)
}