wip: global enter

This commit is contained in:
🪞👃🪞 2024-11-09 01:17:41 +01:00
parent 2105d86428
commit 9b770c468f
6 changed files with 43 additions and 28 deletions

View file

@ -79,7 +79,7 @@ impl Content for PhrasePool<Tui> {
let border = Lozenge(Style::default().bg(Color::Rgb(40, 50, 30)).fg(border_color));
let content = content.fill_xy().bg(Color::Rgb(28, 35, 25)).border(border);
let title_color = if *focused {Color::Rgb(150, 160, 90)} else {Color::Rgb(120, 130, 100)};
let title = format!("[ ] Phrases ({})", phrases.len());
let title = format!("[{}] Phrases ({})", phrases.len(), " ");
let title = TuiStyle::fg(title, title_color).push_x(1);
Layers::new(move|add|{ add(&content)?; Ok(add(&title)?) })
}
@ -267,7 +267,7 @@ impl Content for PhraseEditor<Tui> {
let piano_roll = row!(keys, note_area).fill_x();
let content = piano_roll.bg(Color::Rgb(40, 50, 30)).border(border);
let content = lay!(content, playhead);
let mut upper_left = format!("[ ] Sequencer");
let mut upper_left = format!("[{}] Sequencer", if *entered {""} else {" "});
if let Some(phrase) = phrase {
upper_left = format!("{upper_left}: {}", phrase.read().unwrap().name);
}