impl TuiTheme on Tui; need to to reduce number of ItemPalette invocations

This commit is contained in:
🪞👃🪞 2025-01-19 22:09:37 +01:00
parent 9d250daa04
commit cfa3cad5cb
9 changed files with 157 additions and 177 deletions

View file

@ -133,7 +133,7 @@ impl MidiEditor {
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(TuiTheme::g(64)), String::new().into(), 0, false)
(ItemPalette::from(Tui::g(64)), String::new().into(), 0, false)
};
row!(
FieldV(color, "Edit", format!("{name} ({length})")),
@ -144,7 +144,7 @@ impl MidiEditor {
let (color, length) = if let Some(clip) = self.clip().as_ref().map(|p|p.read().unwrap()) {
(clip.color, clip.length)
} else {
(ItemPalette::from(TuiTheme::g(64)), 0)
(ItemPalette::from(Tui::g(64)), 0)
};
let time_pos = self.time_pos();
let time_zoom = self.time_zoom().get();