From 0820c10f8bbc88a86472437ed0a442367b627fcd Mon Sep 17 00:00:00 2001 From: unspeaker Date: Fri, 1 Nov 2024 16:54:59 +0200 Subject: [PATCH] remove arrangement border --- crates/tek_sequencer/src/arranger_tui.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/tek_sequencer/src/arranger_tui.rs b/crates/tek_sequencer/src/arranger_tui.rs index 44382306..0430dc93 100644 --- a/crates/tek_sequencer/src/arranger_tui.rs +++ b/crates/tek_sequencer/src/arranger_tui.rs @@ -148,20 +148,18 @@ impl<'a> Content for VerticalArranger<'a, Tui> { let any_size = |_|Ok(Some([0,0])); // column separators add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{ - let area = to.area(); let style = Some(Style::default().fg(COLOR_SEPARATOR)); Ok(for x in cols.iter().map(|col|col.1) { - let x = scene_title_w + area.x() + x as u16; - for y in area.y()..area.y2() { to.blit(&"▎", x, y, style); } + let x = scene_title_w + to.area().x() + x as u16; + for y in to.area().y()..to.area().y2() { to.blit(&"▎", x, y, style); } }) }))?; // row separators add(&CustomWidget::new(any_size, move|to: &mut TuiOutput|{ - let area = to.area(); Ok(for y in rows.iter().map(|row|row.1) { - let y = area.y() + (y / PPQ) as u16 + 1; + let y = to.area().y() + (y / PPQ) as u16 + 1; if y >= to.buffer.area.height { break } - for x in area.x()..area.x2().saturating_sub(2) { + for x in to.area().x()..to.area().x2().saturating_sub(2) { if x < to.buffer.area.x && y < to.buffer.area.y { let cell = to.buffer.get_mut(x, y); cell.modifier = Modifier::UNDERLINED; @@ -251,7 +249,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> { }) }).fixed_y(height) } - ).fixed_y((self.0.size.h() as u16).saturating_sub(track_title_h + tracks_footer + 2)); + ).fixed_y((self.0.size.h() as u16).saturating_sub(track_title_h + tracks_footer)); // full grid with header and footer add(&col!(header, content, footer))?; // cursor @@ -302,7 +300,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> { else { area.clip_w(scene_title_w).clip_h(track_title_h) }, &CORNERS)? }) })) - }).bg(bg).grow_y(1).border(border); + }).bg(bg);//.grow_y(1);//.border(border); let color = if self.0.focused {Color::Rgb(150, 160, 90)} else {Color::Rgb(120, 130, 100)}; let size = format!("{}x{}", self.0.size.w(), self.0.size.h()); let lower_right = TuiStyle::fg(size, color).pull_x(1).align_se().fill_xy();