switch sequencer to ItemColorTriplet

This commit is contained in:
🪞👃🪞 2024-11-02 15:16:02 +02:00
parent cb8dfb4bd7
commit 87379ff76b
5 changed files with 25 additions and 15 deletions

View file

@ -32,7 +32,7 @@ impl Content for PhrasePool<Tui> {
if *focused && i == *phrase { row2 = format!("{row2}"); }
};
let row2 = TuiStyle::bold(row2, true);
let bg = if i == self.phrase { color } else { color };
let bg = if i == self.phrase { color.base } else { color.light };
add(&col!(row1, row2).fill_x().bg(bg.rgb))?;
Ok(if *focused && i == self.phrase { add(&CORNERS)?; })
})
@ -57,7 +57,7 @@ impl Content for PhraseEditor<Tui> {
start: time_start, point: time_point, clamp: time_clamp, scale: time_scale
} = *self.time_axis.read().unwrap();
let color = Color::Rgb(0,255,0);
let color = phrase.as_ref().map(|p|p.read().unwrap().color.rgb).unwrap_or(color);
let color = phrase.as_ref().map(|p|p.read().unwrap().color.base.rgb).unwrap_or(color);
let keys = CustomWidget::new(|to:[u16;2]|Ok(Some(to.clip_w(5))), move|to: &mut TuiOutput|{
Ok(if to.area().h() >= 2 {
to.buffer_update(to.area().set_w(5), &|cell, x, y|{