@@ -158,6 +158,7 @@ primary = "light white"
|
||||
secondary = "light black"
|
||||
title = "green"
|
||||
playing = "green"
|
||||
playing_selected = "light green"
|
||||
playing_bg = "black"
|
||||
highlight = "light white"
|
||||
highlight_bg = "#484848"
|
||||
|
||||
@@ -29,6 +29,7 @@ pub struct ConfigTheme {
|
||||
pub secondary: Option<String>,
|
||||
pub title: Option<String>,
|
||||
pub playing: Option<String>,
|
||||
pub playing_selected: Option<String>,
|
||||
pub playing_bg: Option<String>,
|
||||
pub highlight: Option<String>,
|
||||
pub highlight_bg: Option<String>,
|
||||
|
||||
@@ -27,6 +27,10 @@ pub fn load(cfg: &Config) -> Theme {
|
||||
palette[Tertiary] = load_color!(cfg, highlight, TerminalDefault);
|
||||
palette[Highlight] = load_color!(cfg, highlight_bg, Dark(Red));
|
||||
palette.set_color("playing", load_color!(cfg, playing, Dark(Blue)));
|
||||
palette.set_color(
|
||||
"playing_selected",
|
||||
load_color!(cfg, playing_selected, Light(Blue)),
|
||||
);
|
||||
palette.set_color("playing_bg", load_color!(cfg, playing_bg, TerminalDefault));
|
||||
palette.set_color("error", load_color!(cfg, error, TerminalDefault));
|
||||
palette.set_color("error_bg", load_color!(cfg, error_bg, Dark(Red)));
|
||||
|
||||
@@ -175,7 +175,7 @@ impl<I: ListItem> View for ListView<I> {
|
||||
|
||||
let style = if self.selected == i {
|
||||
let fg = if item.is_playing(self.queue.clone()) {
|
||||
*printer.theme.palette.custom("playing").unwrap()
|
||||
*printer.theme.palette.custom("playing_selected").unwrap()
|
||||
} else {
|
||||
PaletteColor::Tertiary.resolve(&printer.theme.palette)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user