fold view_iter

This commit is contained in:
🪞👃🪞 2025-03-17 00:15:03 +02:00
parent 74ce1b9f55
commit fbcf148293
5 changed files with 143 additions and 139 deletions

View file

@ -12,7 +12,7 @@ impl<'a> ArrangerView<'a> {
.middle(self.width_mid,
per_track(
self.width_mid,
||self.tracks_with_sizes(),
||self.tracks_with_sizes_scrolled(),
|t, track|view_track_header(t, track, self.track_selected == Some(t))))
}
@ -32,7 +32,7 @@ impl<'a> ArrangerView<'a> {
}))
.middle(self.width_mid, per_track(
self.width_mid,
||self.tracks_with_sizes(),
||self.tracks_with_sizes_scrolled(),
move|track_index, track|Map::new(
||self.scenes_with_track_colors(),
move|(scene_index, scene, y1, y2, prev_scene): SceneWithColor, _|
@ -58,21 +58,6 @@ impl<'a> ArrangerView<'a> {
button_3("S", "add scene", self.app.fmtd.read().unwrap().scns.view.clone(), self.is_editing)
}
fn scenes_with_scene_colors (&'a self) -> impl ScenesColors<'a> {
self.app.scenes_with_colors(
self.is_editing,
self.tracks_height
)
}
fn scenes_with_track_colors (&'a self) -> impl ScenesColors<'a> {
self.app.scenes_with_track_colors(
self.is_editing,
self.tracks_height,
self.track_selected.unwrap_or(0)
)
}
fn track_counter (&'a self) -> Arc<RwLock<String>> {
let track_counter_data = (self.track_selected.unwrap_or(0), self.track_count);
self.app.fmtd.write().unwrap().trks.update(