wip: <200 errors yay

This commit is contained in:
🪞👃🪞 2024-09-05 16:01:01 +03:00
parent 14d619a10a
commit 694970bf0d
20 changed files with 384 additions and 305 deletions

View file

@ -101,7 +101,7 @@ impl ArrangerViewMode {
}
/// Render arranger to terminal
impl Render<Tui> for Arranger<Tui> {
fn render (&'a self, to: &'a mut TuiOutput<'a>) -> Perhaps<Rect> {
fn render (&self, to: &mut Tui) -> Perhaps<Rect> {
let area = (|to|match self.mode {
ArrangerViewMode::Horizontal =>
super::arranger_view_h::draw(self, to),
@ -111,18 +111,19 @@ impl Render<Tui> for Arranger<Tui> {
super::arranger_view_v::draw_compact_2(self, to),
ArrangerViewMode::VerticalExpanded =>
super::arranger_view_v::draw_expanded(self, to),
})(&mut to.area(Rect {
x: to.area.x + 1,
width: to.area.width - 2,
y: to.area.y + 1,
height: to.area.height - 2
}))?.unwrap();
Lozenge(Style::default().fg(Nord::BG2)).draw(&mut to.area(Rect {
x: area.x.saturating_sub(1),
width: area.width + 2,
y: area.y.saturating_sub(1),
height: area.height + 2,
}))
})(&mut to.alter_area(|x, y, w, h|(
x + 1,
y + 1,
w.saturating_sub(2),
h.saturating_sub(2),
)))?.unwrap();
Lozenge(Style::default().fg(Nord::BG2))
.draw(&mut to.alter_area(|x, y, w, h|(
x.saturating_sub(1),
y.saturating_sub(1),
w + 2,
h + 2,
)))
}
}
impl Focusable<Tui> for Arranger<Tui> {