switch around ownership of pool and editort

This commit is contained in:
🪞👃🪞 2025-05-17 13:23:31 +03:00
parent 3f1a2fee80
commit c7e7c9f68c
8 changed files with 157 additions and 150 deletions

View file

@ -83,7 +83,7 @@ impl App {
self.project.view_scenes_names()
}
pub fn view_arranger_scenes_clips (&self) -> impl Content<TuiOut> + use<'_> {
self.project.view_scenes_clips(&self.editor)
self.project.view_scenes_clips()
}
pub fn view_arranger_track_names (&self) -> impl Content<TuiOut> + use<'_> {
self.project.view_track_names(self.color)
@ -117,7 +117,7 @@ impl App {
Fixed::x(20, Bsp::s(
Fill::x(Align::w(FieldH(self.color, "Clip pool:", ""))),
Fill::y(Align::n(Tui::bg(Rgb(0, 0, 0), Outer(true, Style::default().fg(Tui::g(96)))
.enclose(PoolView(&self.project.pool)))))))
.enclose(PoolView(&self.pool)))))))
}
pub fn view_samples_keys (&self) -> impl Content<TuiOut> + use<'_> {
self.project.sampler().map(|s|s.view_list(true, self.editor().unwrap()))
@ -243,20 +243,14 @@ impl ScenesView for App {
fn arrangement (&self) -> &Arrangement {
&self.project
}
fn scenes_height (&self) -> u16 {
fn h_scenes (&self) -> u16 {
(self.height() as u16).saturating_sub(20)
}
fn width_side (&self) -> u16 {
fn w_side (&self) -> u16 {
20
}
fn width_mid (&self) -> u16 {
(self.width() as u16).saturating_sub(self.width_side())
}
fn scene_selected (&self) -> Option<usize> {
self.project.selection.scene()
}
fn track_selected (&self) -> Option<usize> {
self.project.selection.track()
fn w_mid (&self) -> u16 {
(self.width() as u16).saturating_sub(self.w_side())
}
}