Fix colour defaults to support dark terminals

Changes default TColors to use Reset value instead
of black and white. This improves readability for
both light and dark terminals.
This commit is contained in:
Angus McMillan 2020-11-15 19:05:04 +11:00
parent ca3ad0fbd6
commit c502b51129
No known key found for this signature in database
GPG key ID: 9B0963717D4B59DE
2 changed files with 7 additions and 7 deletions

View file

@ -39,7 +39,7 @@ impl<'a> Default for Calendar<'a> {
year,
month,
date_style: vec![],
title_background_color: Color::White,
title_background_color: Color::Reset,
}
}
}

View file

@ -20,8 +20,8 @@ impl Default for TColor {
impl TColor {
pub fn default() -> Self {
Self {
fg: Color::Black,
bg: Color::White,
fg: Color::Reset,
bg: Color::Reset,
modifiers: vec![],
}
}
@ -99,9 +99,9 @@ impl Config {
uda_selection_blink: Self::get_uda_selection_blink(),
uda_calendar_months_per_row: Self::get_uda_months_per_row(),
uda_style_calendar_title: Self::get_uda_style("calendar.title")
.unwrap_or(TColor::new(Color::Black, Color::Rgb(220, 220, 220), vec![])),
.unwrap_or(TColor::new(Color::Reset, Color::Reset, vec![])),
uda_style_context_active: Self::get_uda_style("context.active")
.unwrap_or(TColor::new(Color::Black, Color::Rgb(220, 220, 220), vec![])),
.unwrap_or(TColor::new(Color::Reset, Color::Reset, vec![])),
})
}
@ -166,8 +166,8 @@ impl Config {
}
let foreground = foreground.replace("inverse ", "");
TColor {
fg: Self::get_color_foreground(foreground.as_str(), Color::Black),
bg: Self::get_color_background(background.as_str(), Color::White),
fg: Self::get_color_foreground(foreground.as_str(), Color::Reset),
bg: Self::get_color_background(background.as_str(), Color::Reset),
modifiers,
}
}