mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
editor: 19x11 wat? but shows
This commit is contained in:
parent
4f3a50f2d6
commit
5ed69edd02
3 changed files with 9 additions and 21 deletions
|
|
@ -1,19 +1,5 @@
|
|||
use crate::*;
|
||||
|
||||
impl Content<TuiOut> for Arrangement {
|
||||
fn content (&self) -> impl Render<TuiOut> {
|
||||
panic!();
|
||||
let ins = |x|Bsp::n(self.view_inputs_0(), x);
|
||||
let tracks = |x|Bsp::s(self.view_tracks_0(), x);
|
||||
let devices = |x|Bsp::s(self.view_devices_0(), x);
|
||||
let outs = |x|Bsp::s(self.view_outputs_0(), x);
|
||||
let bg = |x|Tui::bg(Reset, x);
|
||||
//let track_scroll = |x|Bsp::s(&self.track_scroll, x);
|
||||
//let scene_scroll = |x|Bsp::e(&self.scene_scroll, x);
|
||||
self.size.of(outs(tracks(devices(ins(bg(self.view_scenes_clips()))))))
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> TracksView for T
|
||||
where T: ScenesView + HasMidiIns + HasMidiOuts + HasSize<TuiOut> + HasTrackScroll + HasSelection + HasMidiIns + HasEditor {}
|
||||
|
||||
|
|
@ -439,7 +425,7 @@ pub trait ClipsView: TracksView + ScenesView + Send + Sync {
|
|||
}))
|
||||
}
|
||||
|
||||
fn view_track_clips <'a> (&'a self, track_index: usize, track: &Track) -> impl Content<TuiOut> {
|
||||
fn view_track_clips <'a> (&'a self, track_index: usize, track: &'a Track) -> impl Content<TuiOut> + 'a {
|
||||
Stack::south(move|cell: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
for (scene_index, scene) in self.scenes().iter().enumerate().skip(self.scene_scroll()) {
|
||||
let (name, theme) = if let Some(Some(clip)) = &scene.clips.get(track_index) {
|
||||
|
|
@ -480,8 +466,11 @@ pub trait ClipsView: TracksView + ScenesView + Send + Sync {
|
|||
} as u16,
|
||||
Bsp::b(
|
||||
Fill::xy(Outer(true, Style::default().fg(outline))),
|
||||
Fill::xy(Align::nw(Tui::fg_bg(fg, bg, Align::nw(name.unwrap_or(" ---- ".into())))))
|
||||
)));
|
||||
Fill::xy(Bsp::b(
|
||||
Fill::xy(Align::nw(Tui::fg_bg(fg, bg, Align::nw(name.unwrap_or(" ---- ".into()))))),
|
||||
Fill::xy(When(self.selection().track() == Some(track_index)
|
||||
&& self.selection().scene() == Some(scene_index)
|
||||
&& self.is_editing(), self.editor())))))));
|
||||
//let (name, theme) = if let Some(clip) = &scene.clips.get(track_index).flatten() {
|
||||
//let clip = clip.read().unwrap();
|
||||
//(Some(clip.name.clone()), clip.color)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue