Skip to content

Commit

Permalink
fix(theme): restore ratatui colors
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Aug 3, 2024
1 parent 2ce1a06 commit 1726d21
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/atuin-client/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,20 +258,20 @@ lazy_static! {
"default".to_string(),
None,
HashMap::from([
(Meaning::AlertError, StyleFactory::from_fg_color(Color::Red)),
(Meaning::AlertError, StyleFactory::from_fg_color(Color::DarkRed)),
(
Meaning::AlertWarn,
StyleFactory::from_fg_color(Color::Yellow),
StyleFactory::from_fg_color(Color::DarkYellow),
),
(
Meaning::AlertInfo,
StyleFactory::from_fg_color(Color::Green),
StyleFactory::from_fg_color(Color::DarkGreen),
),
(
Meaning::Annotation,
StyleFactory::from_fg_color(Color::DarkGrey),
),
(Meaning::Guidance, StyleFactory::from_fg_color(Color::Blue)),
(Meaning::Guidance, StyleFactory::from_fg_color(Color::DarkBlue)),
(
Meaning::Important,
StyleFactory::from_fg_color(Color::White),
Expand Down Expand Up @@ -536,7 +536,7 @@ mod theme_tests {
// Falls back to red as meaning missing from theme, so picks base default.
assert_eq!(
theme.as_style(Meaning::AlertError).foreground_color,
Some(Color::Red)
Some(Color::DarkRed)
);

// Falls back to Important as Title not available.
Expand Down Expand Up @@ -581,13 +581,13 @@ mod theme_tests {
fn test_can_get_colors_via_convenience_functions() {
let mut manager = ThemeManager::new(Some(true), Some("".to_string()));
let theme = manager.load_theme("default", None);
assert_eq!(theme.get_error().foreground_color.unwrap(), Color::Red);
assert_eq!(theme.get_warning().foreground_color.unwrap(), Color::Yellow);
assert_eq!(theme.get_info().foreground_color.unwrap(), Color::Green);
assert_eq!(theme.get_error().foreground_color.unwrap(), Color::DarkRed);
assert_eq!(theme.get_warning().foreground_color.unwrap(), Color::DarkYellow);
assert_eq!(theme.get_info().foreground_color.unwrap(), Color::DarkGreen);
assert_eq!(theme.get_base().foreground_color, None);
assert_eq!(
theme.get_alert(log::Level::Error).foreground_color.unwrap(),
Color::Red
Color::DarkRed
)
}

Expand Down Expand Up @@ -683,7 +683,7 @@ mod theme_tests {
nunsolarized_theme
.as_style(Meaning::Guidance)
.foreground_color,
Some(Color::Blue)
Some(Color::DarkBlue)
);

testing_logger::validate(|captured_logs| {
Expand Down

0 comments on commit 1726d21

Please sign in to comment.