mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
trying to fix the main layout, what happened
This commit is contained in:
parent
0c6484d733
commit
85749a3437
6 changed files with 41 additions and 37 deletions
|
|
@ -69,13 +69,14 @@ pub(crate) struct ArrangerView<'a> {
|
|||
|
||||
impl<'a> Content<TuiOut> for ArrangerView<'a> {
|
||||
fn content (&self) -> impl Render<TuiOut> {
|
||||
Bsp::s(self.inputs(),
|
||||
Bsp::s(self.tracks(),
|
||||
Bsp::n(self.outputs(), Tui::bg(Reset, Bsp::s(
|
||||
&self.track_scroll,
|
||||
Bsp::e(
|
||||
&self.scene_scroll,
|
||||
Fixed::y(self.scenes_height, self.scenes())))))))
|
||||
let with_inputs = |x|Bsp::s(self.inputs(), x);
|
||||
let with_tracks = |x|Bsp::s(self.tracks(), x);
|
||||
let with_outputs = |x|Bsp::n(self.outputs(), x);
|
||||
let with_track_scroll = |x|Bsp::s(&self.track_scroll, x);
|
||||
let with_scene_scroll = |x|Bsp::e(&self.scene_scroll, x);
|
||||
let with_background = |x|Tui::bg(Reset, x);
|
||||
with_inputs(with_tracks(with_outputs(with_background(with_track_scroll(with_scene_scroll(
|
||||
self.scenes()))))))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +90,7 @@ impl<'a> ArrangerView<'a> {
|
|||
width_mid: app.w_tracks_area(),
|
||||
width_side: app.w_sidebar(),
|
||||
|
||||
inputs_height: app.h_inputs().saturating_sub(1),
|
||||
inputs_height: app.h_inputs(),
|
||||
inputs_count: app.midi_ins.len(),
|
||||
|
||||
outputs_height: app.h_outputs().saturating_sub(1),
|
||||
|
|
@ -147,14 +148,16 @@ impl<'a> ArrangerView<'a> {
|
|||
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 {
|
||||
None
|
||||
} else { Some((s, scene, y1, y2, if s == 0 {
|
||||
None
|
||||
} else {
|
||||
Some(self.app.scenes[s-1].clips[self.track_selected.unwrap_or(0)].as_ref()
|
||||
.map(|c|c.read().unwrap().color)
|
||||
.unwrap_or(ItemPalette::G[32]))
|
||||
}))
|
||||
})
|
||||
Some((s, scene, y1, y2, if s == 0 {
|
||||
None
|
||||
} else {
|
||||
Some(self.app.scenes[s-1].clips[self.track_selected.unwrap_or(0)].as_ref()
|
||||
.map(|c|c.read().unwrap().color)
|
||||
.unwrap_or(ItemPalette::G[32]))
|
||||
}))
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue