mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-13 15:16:41 +01:00
cleanup: sub 4k again
This commit is contained in:
parent
214061a419
commit
d8c9abf744
13 changed files with 101 additions and 505 deletions
|
|
@ -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)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue