Skip to content

Commit

Permalink
Merge pull request #23 from mkhl/light-background
Browse files Browse the repository at this point in the history
Support terminals with light background
  • Loading branch information
rgwood authored Sep 14, 2024
2 parents b89e296 + 779571d commit db89a70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ impl Component for Home {
} else if unit.is_not_found() {
Color::Yellow
} else {
Color::White
Color::Reset
}
}

Expand Down Expand Up @@ -777,14 +777,14 @@ impl Component for Home {
"loaded" => Color::Green,
"not-found" => Color::Yellow,
"error" => Color::Red,
_ => Color::White,
_ => Color::Reset,
};

let active_color = match i.activation_state.as_str() {
"active" => Color::Green,
"inactive" => Color::Gray,
"failed" => Color::Red,
_ => Color::White,
_ => Color::Reset,
};

let active_state_value = format!("{} ({})", i.activation_state, i.sub_state);
Expand All @@ -795,8 +795,8 @@ impl Component for Home {
};

let mut lines = vec![
colored_line(&i.description, Color::White),
colored_line(scope, Color::White),
colored_line(&i.description, Color::Reset),
colored_line(scope, Color::Reset),
colored_line(&i.load_state, load_color),
line_color_string(active_state_value, active_color),
];
Expand Down

0 comments on commit db89a70

Please sign in to comment.