mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
pre generate grayscale palettes
This commit is contained in:
parent
cfa3cad5cb
commit
ee28d431bd
7 changed files with 16 additions and 12 deletions
|
|
@ -132,9 +132,7 @@ impl MidiEditor {
|
|||
pub fn clip_status (&self) -> impl Content<TuiOut> + '_ {
|
||||
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 {
|
||||
(ItemPalette::from(Tui::g(64)), String::new().into(), 0, false)
|
||||
};
|
||||
} else { (ItemPalette::G[64], String::new().into(), 0, false) };
|
||||
row!(
|
||||
FieldV(color, "Edit", format!("{name} ({length})")),
|
||||
FieldV(color, "Loop", looped.to_string())
|
||||
|
|
@ -143,9 +141,7 @@ impl MidiEditor {
|
|||
pub fn edit_status (&self) -> impl Content<TuiOut> + '_ {
|
||||
let (color, length) = if let Some(clip) = self.clip().as_ref().map(|p|p.read().unwrap()) {
|
||||
(clip.color, clip.length)
|
||||
} else {
|
||||
(ItemPalette::from(Tui::g(64)), 0)
|
||||
};
|
||||
} else { (ItemPalette::G[64], 0) };
|
||||
let time_pos = self.time_pos();
|
||||
let time_zoom = self.time_zoom().get();
|
||||
let time_lock = if self.time_lock().get() { "[lock]" } else { " " };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue