mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
arranger: trying to fix conditional layers
This commit is contained in:
parent
9fcb5a08c6
commit
01db41b75d
5 changed files with 24 additions and 17 deletions
|
|
@ -240,13 +240,13 @@ pub trait ScenesView:
|
|||
fn w_side (&self) -> u16;
|
||||
fn w_mid (&self) -> u16;
|
||||
fn scenes_with_sizes (&self) -> impl ScenesSizes<'_> {
|
||||
let editing = self.editor().is_some();
|
||||
let height = Self::H_SCENE;
|
||||
let larger = 8;//FIXME//self.editor().map(|e|e.height()).unwrap_or(Self::H_SCENE);
|
||||
let selected_track = self.selection().track();
|
||||
let selected_scene = self.selection().scene();
|
||||
let mut y = 0;
|
||||
self.scenes().iter().enumerate().skip(self.scene_scroll()).map_while(move|(s, scene)|{
|
||||
let height = if self.selection().scene() == Some(s) && self.editor().is_some() {
|
||||
8
|
||||
} else {
|
||||
Self::H_SCENE
|
||||
};
|
||||
if y + height <= self.clips_size().h() {
|
||||
let data = (s, scene, y, y + height);
|
||||
y += height;
|
||||
|
|
@ -257,11 +257,11 @@ pub trait ScenesView:
|
|||
})
|
||||
}
|
||||
fn view_scenes_names (&self) -> impl Content<TuiOut> {
|
||||
Stack::south(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
Fixed::x(20, Stack::south(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (index, scene, ..) in self.scenes_with_sizes() {
|
||||
add(&self.view_scene_name(index, scene));
|
||||
}
|
||||
})
|
||||
}))
|
||||
}
|
||||
fn view_scene_name (&self, index: usize, scene: &Scene) -> impl Content<TuiOut> {
|
||||
let h = if self.selection().scene() == Some(index) && let Some(editor) = self.editor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue