cleanup: sub 4k again

This commit is contained in:
🪞👃🪞 2024-07-09 12:47:53 +03:00
parent 214061a419
commit d8c9abf744
13 changed files with 101 additions and 505 deletions

View file

@ -9,11 +9,20 @@ pub struct ChainView<'a> {
}
impl<'a> ChainView<'a> {
pub fn horizontal (app: &'a App) -> Self {
Self::new(app, false)
}
pub fn vertical (app: &'a App) -> Self {
Self::new(app, true)
}
pub fn new (app: &'a App, vertical: bool) -> Self {
Self {
vertical,
focused: app.section == AppSection::Chain,
track: app.tracks.get(app.track_cursor - 1),
vertical
track: match app.track_cursor {
0 => None,
_ => app.tracks.get(app.track_cursor - 1)
},
}
}
}