mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-11 14:16:42 +01:00
wip: zoom lock
This commit is contained in:
parent
94491a323a
commit
44c28183de
11 changed files with 107 additions and 89 deletions
|
|
@ -1,5 +1,19 @@
|
|||
use crate::*;
|
||||
|
||||
pub struct MidiEditClip<'a>(pub &'a MidiEditor);
|
||||
render!(Tui: (self: MidiEditClip<'a>) => {
|
||||
let (color, name, length, looped) = if let Some(phrase) = self.0.phrase().as_ref().map(|p|p.read().unwrap()) {
|
||||
(phrase.color, phrase.name.clone(), phrase.length, phrase.looped)
|
||||
} else {
|
||||
(ItemPalette::from(TuiTheme::g(64)), String::new(), 0, false)
|
||||
};
|
||||
Fixed::y(1, row!(
|
||||
Field(color, "Edit", name.to_string()),
|
||||
Field(color, "Length", length.to_string()),
|
||||
Field(color, "Loop", looped.to_string())
|
||||
))
|
||||
});
|
||||
|
||||
pub struct MidiEditStatus<'a>(pub &'a MidiEditor);
|
||||
render!(Tui: (self: MidiEditStatus<'a>) => {
|
||||
let (color, name, length, looped) = if let Some(phrase) = self.0.phrase().as_ref().map(|p|p.read().unwrap()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue