wip: rename in arrangement; phrase pool help

This commit is contained in:
🪞👃🪞 2024-10-18 17:16:12 +03:00
parent 0f3c777c88
commit 7ebc8af2f3
3 changed files with 23 additions and 8 deletions

View file

@ -41,8 +41,18 @@ 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 = TuiStyle::fg("Phrases", title_color).push_x(1);
lay!(content, title)
let title = format!("Phrases ({})", phrases.len());
let title = TuiStyle::fg(title, title_color).push_x(1);
Layers::new(move|add|{
add(&content)?;
add(&title)?;
//if self.focused {
//let commands = "[A]ppend [I]nsert [D]uplicate [C]olor re[N]ame leng[T]h [,.] Move";
//let lower_left = Align::SW(TuiStyle::fg(commands, title_color).push_x(1));
//add(&lower_left)?;
//}
Ok(())
})
}
}
impl Content for PhraseEditor<Tui> {
@ -290,11 +300,6 @@ pub(crate) fn keys_vert () -> Buffer {
});
buffer
}
/// Octave number (from -1 to 9)
const NTH_OCTAVE: [&'static str;11] = [
"-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
];
impl Content for PhraseLength<Tui> {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {