did i just fix arranger layout?

This commit is contained in:
🪞👃🪞 2025-04-17 03:31:32 +03:00
parent 3beb24d594
commit 997c8e2d6e
5 changed files with 69 additions and 65 deletions

View file

@ -42,10 +42,10 @@ pub(crate) struct ArrangerView<'a> {
impl<'a> Content<TuiOut> for ArrangerView<'a> {
fn content (&self) -> impl Render<TuiOut> {
let ins = |x|Bsp::s(self.inputs(), x);
let tracks = |x|Bsp::s(self.tracks(), x);
let outs = |x|Bsp::n(self.outputs(), x);
let bg = |x|Tui::bg(Green, x);
let ins = |x|Bsp::s(self.inputs(), x);
let tracks = |x|Bsp::s(self.tracks(), x);
let outs = |x|Bsp::n(self.outputs(), x);
let bg = |x|Tui::bg(Color::Reset, x);
//let track_scroll = |x|Bsp::s(&self.track_scroll, x);
//let scene_scroll = |x|Bsp::e(&self.scene_scroll, x);
ins(tracks(outs(bg(self.scenes()))))
@ -104,7 +104,7 @@ impl<'a> ArrangerView<'a> {
-> impl ScenesColors<'_>
{
self.app.scenes_with_sizes(self.is_editing, Tek::H_SCENE, Tek::H_EDITOR).map_while(
move|(s, scene, y1, y2)|if y2 as u16 > self.tracks_height {
move|(s, scene, y1, y2)|if y2 as u16 > self.scenes_height {
None
} else { Some((s, scene, y1, y2, if s == 0 {
None
@ -118,7 +118,7 @@ impl<'a> ArrangerView<'a> {
-> impl ScenesColors<'_>
{
self.app.scenes_with_sizes(self.is_editing, Tek::H_SCENE, Tek::H_EDITOR).map_while(
move|(s, scene, y1, y2)|if y2 as u16 > self.tracks_height {
move|(s, scene, y1, y2)|if y2 as u16 > self.scenes_height {
None
} else {
Some((s, scene, y1, y2, if s == 0 {