mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
impl TuiTheme on Tui; need to to reduce number of ItemPalette invocations
This commit is contained in:
parent
9d250daa04
commit
cfa3cad5cb
9 changed files with 157 additions and 177 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue