mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-11 22:26:44 +01:00
migrate Color -> ItemColor and remove unused
This commit is contained in:
parent
33600e890f
commit
eb1e3179a4
6 changed files with 59 additions and 76 deletions
|
|
@ -33,7 +33,7 @@ impl Content for PhrasePool<Tui> {
|
|||
};
|
||||
let row2 = TuiStyle::bold(row2, true);
|
||||
let bg = if i == self.phrase { color } else { color };
|
||||
add(&col!(row1, row2).fill_x().bg(bg))?;
|
||||
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).unwrap_or(color);
|
||||
let color = phrase.as_ref().map(|p|p.read().unwrap().color.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|{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue