mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 13:16:44 +01:00
wip: <200 errors yay
This commit is contained in:
parent
14d619a10a
commit
694970bf0d
20 changed files with 384 additions and 305 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue