mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 13:16:44 +01:00
also constrain scenes from top and bottom
This commit is contained in:
parent
e4620b9a92
commit
1172615d8b
2 changed files with 5 additions and 2 deletions
|
|
@ -192,6 +192,9 @@ impl Tek {
|
||||||
fn w_tracks_area (&self) -> u16 {
|
fn w_tracks_area (&self) -> u16 {
|
||||||
self.w().saturating_sub(2 * self.w_sidebar())
|
self.w().saturating_sub(2 * self.w_sidebar())
|
||||||
}
|
}
|
||||||
|
fn h_tracks_area (&self) -> u16 {
|
||||||
|
self.h().saturating_sub(self.h_inputs() + self.h_outputs() + 10)
|
||||||
|
}
|
||||||
fn h_inputs (&self) -> u16 {
|
fn h_inputs (&self) -> u16 {
|
||||||
1 + self.inputs_sizes().last().map(|(_, _, _, _, y)|y as u16).unwrap_or(0)
|
1 + self.inputs_sizes().last().map(|(_, _, _, _, y)|y as u16).unwrap_or(0)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ impl Tek {
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
pub fn view_scenes (&self) -> impl Content<TuiOut> + use<'_> {
|
pub fn view_scenes (&self) -> impl Content<TuiOut> + use<'_> {
|
||||||
let w = (self.size.w() as u16).saturating_sub(2 * self.w_sidebar());
|
let w = self.w_tracks_area();
|
||||||
let h = (self.size.h() as u16).saturating_sub(self.h_inputs() + self.h_outputs() + 1);
|
let h = self.h_tracks_area();
|
||||||
let editing = self.is_editing();
|
let editing = self.is_editing();
|
||||||
let selected_track = self.selected().track();
|
let selected_track = self.selected().track();
|
||||||
let selected_scene = self.selected().scene();
|
let selected_scene = self.selected().scene();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue