mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
remove tek_proc; add Border
This commit is contained in:
parent
6624fb476c
commit
70cef99931
9 changed files with 103 additions and 81 deletions
|
|
@ -73,29 +73,22 @@ impl ArrangerStandalone<Tui> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Widget for ArrangerStandalone<Tui> {
|
||||
impl Content for ArrangerStandalone<Tui> {
|
||||
type Engine = Tui;
|
||||
fn layout (&self, to: [u16;4]) -> Perhaps<[u16;4]> {
|
||||
Ok(Some(to))
|
||||
}
|
||||
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
|
||||
let area = to.area();
|
||||
let sequencer = self.arranger.sequencer()
|
||||
.map(|t|t as &dyn Widget<Engine = Tui>);
|
||||
let result = Split::down(|add|{
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
Split::down(|add|{
|
||||
add(&self.transport)?;
|
||||
add(&self.arranger)?;
|
||||
add(&sequencer)?;
|
||||
if let Some(sequencer) = self.arranger.sequencer() {
|
||||
add(sequencer)?;
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
//.focus(Some(self.focus))
|
||||
.render(to)?;
|
||||
if let Some(ref modal) = self.arranger.modal {
|
||||
to.fill_bg(area, Nord::bg_lo(false, false));
|
||||
to.fill_fg(area, Nord::bg_hi(false, false));
|
||||
modal.render(to)?;
|
||||
}
|
||||
Ok(result)
|
||||
//if let Some(ref modal) = self.arranger.modal {
|
||||
//to.fill_bg(area, Nord::bg_lo(false, false));
|
||||
//to.fill_fg(area, Nord::bg_hi(false, false));
|
||||
//modal.render(to)?;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue