also highlight currently playing track if selected

This commit is contained in:
Henrik Friedrichsen
2019-03-24 19:11:36 +01:00
parent 2d4b18a30b
commit 79246957df

View File

@@ -70,8 +70,12 @@ impl<I: ListItem> View for ListView<I> {
let item = &content[i];
let style = if self.selected == i {
let fg = match item.is_playing(self.queue.clone()) {
true => *printer.theme.palette.custom("playing").unwrap(),
false => PaletteColor::Tertiary.resolve(&printer.theme.palette)
};
ColorStyle::new(
ColorType::Palette(PaletteColor::Tertiary),
ColorType::Color(fg),
ColorType::Palette(PaletteColor::Highlight),
)
} else if item.is_playing(self.queue.clone()) {