mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-02-21 16:29:04 +01:00
This commit is contained in:
parent
82ff49b386
commit
2d7ca155e0
7 changed files with 38 additions and 29 deletions
|
|
@ -195,16 +195,16 @@ pub trait TracksView:
|
|||
HasClipsSize
|
||||
{
|
||||
fn tracks_width_available (&self) -> u16 {
|
||||
(self.width() as u16).saturating_sub(40)
|
||||
(self.measure_width() as u16).saturating_sub(40)
|
||||
}
|
||||
/// Iterate over tracks with their corresponding sizes.
|
||||
fn tracks_with_sizes (&self) -> impl TracksSizes<'_> {
|
||||
let _editor_width = self.editor().map(|e|e.width());
|
||||
let _editor_width = self.editor().map(|e|e.measure_width());
|
||||
let _active_track = self.selection().track();
|
||||
let mut x = 0;
|
||||
self.tracks().iter().enumerate().map_while(move |(index, track)|{
|
||||
let width = track.width.max(8);
|
||||
if x + width < self.clips_size().w() {
|
||||
if x + width < self.clips_size().w() as usize {
|
||||
let data = (index, track, x, x + width);
|
||||
x += width + Self::TRACK_SPACING;
|
||||
Some(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue