draws again!
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
i do not exist 2026-08-23 11:29:48 +03:00
parent f2443a4314
commit 6771b24f79
17 changed files with 105 additions and 96 deletions

View file

@ -268,7 +268,7 @@ impl MidiEditor {
self.get_time_pos().overflowing_sub(1)
.0.min(self.clip_length().saturating_sub(1))
}
pub fn clip_status (&self) -> impl Draw<'_, Tui> + '_ {
pub fn clip_status (&self) -> impl Draw<Tui> + '_ {
let (_color, name, length, looped) = if let Some(clip) = self.clip().as_ref().map(|p|p.read().unwrap()) {
(clip.color, clip.name.clone(), clip.length, clip.looped)
} else { (ItemTheme::G[64], String::new().into(), 0, false) };
@ -281,7 +281,7 @@ impl MidiEditor {
.origin_w().full_w(),
).exact_w(20)
}
pub fn edit_status (&self) -> impl Draw<'_, Tui> + '_ {
pub fn edit_status (&self) -> impl Draw<Tui> + '_ {
let (_color, length) = if let Some(clip) = self.clip().as_ref().map(|p|p.read().unwrap()) {
(clip.color, clip.length)
} else { (ItemTheme::G[64], 0) };
@ -425,11 +425,11 @@ impl MidiViewer for MidiEditor {
fn set_clip (&mut self, p: Option<&Arc<RwLock<MidiClip>>>) { self.mode.set_clip(p) }
}
impl View<Tui> for MidiEditor {
fn view (&self) -> impl Draw<'_, Tui> {
impl Draw<Tui> for MidiEditor {
fn draw (&self, to: &mut Tui) -> Drawn<u16> {
self.autoscroll();
/*self.autozoom();*/
self.size.of(self.mode.view())
self.size.of(&self.mode).draw(to)
}
}