mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
wip: replacing Rect with [u16;4] in mixer and sequencer
This commit is contained in:
parent
fa739a49b2
commit
06f8bd1116
14 changed files with 106 additions and 106 deletions
|
|
@ -101,7 +101,7 @@ impl ArrangerViewMode {
|
|||
}
|
||||
/// Render arranger to terminal
|
||||
impl Render<Tui> for Arranger<Tui> {
|
||||
fn render (&self, to: &mut Tui) -> Perhaps<Rect> {
|
||||
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
|
||||
let area = (|to|match self.mode {
|
||||
ArrangerViewMode::Horizontal =>
|
||||
super::arranger_view_h::draw(self, to),
|
||||
|
|
@ -111,19 +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.alter_area(|x, y, w, h|(
|
||||
})(&mut to.alter_area(|[x, y, w, h]|[
|
||||
x + 1,
|
||||
y + 1,
|
||||
w.saturating_sub(2),
|
||||
h.saturating_sub(2),
|
||||
)))?.unwrap();
|
||||
]))?.unwrap();
|
||||
Lozenge(Style::default().fg(Nord::BG2))
|
||||
.draw(&mut to.alter_area(|x, y, w, h|(
|
||||
.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