mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-08-28 12:56:57 +02:00
parent
e50c4a5eef
commit
e6984915e4
22 changed files with 1002 additions and 294 deletions
|
|
@ -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) };
|
||||
|
|
@ -426,7 +426,7 @@ impl MidiViewer for MidiEditor {
|
|||
}
|
||||
|
||||
impl View<Tui> for MidiEditor {
|
||||
fn view (&self) -> impl Draw<Tui> {
|
||||
fn view (&self) -> impl Draw<'_, Tui> {
|
||||
self.autoscroll();
|
||||
/*self.autozoom();*/
|
||||
self.size.of(self.mode.view())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue