Fix: align with color palette of Cursive

Should make context menus (`SelectView`) look like ncspot's `ListView`.

Fixes #431
This commit is contained in:
Henrik Friedrichsen
2022-08-20 23:40:33 +02:00
parent 966223392e
commit a9f7f3cddc
3 changed files with 10 additions and 14 deletions

View File

@@ -176,15 +176,14 @@ impl<I: ListItem> View for ListView<I> {
&& self.queue.get_current_index() == Some(i);
let style = if self.selected == i {
let fg = if currently_playing {
*printer.theme.palette.custom("playing_selected").unwrap()
if currently_playing {
ColorStyle::new(
*printer.theme.palette.custom("playing_selected").unwrap(),
ColorType::Palette(PaletteColor::Highlight),
)
} else {
PaletteColor::Tertiary.resolve(&printer.theme.palette)
};
ColorStyle::new(
ColorType::Color(fg),
ColorType::Palette(PaletteColor::Highlight),
)
ColorStyle::highlight()
}
} else if currently_playing {
ColorStyle::new(
ColorType::Color(*printer.theme.palette.custom("playing").unwrap()),