summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrhun Parmaksız <orhunparmaksiz@gmail.com>2023-09-13 23:24:05 +0300
committerOrhun Parmaksız <orhunparmaksiz@gmail.com>2023-09-13 23:24:13 +0300
commit3f862ffcddc0449fab72867e10ce80c956965c11 (patch)
tree37f2f06dc879f541fbaf0e314f4e9460ee6414e5
parentfed4fad7e0050204e35087d6a8ce684aad155c8c (diff)
style(tui): use better colors when background color is set to reset
-rw-r--r--systeroid-tui/src/style.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/systeroid-tui/src/style.rs b/systeroid-tui/src/style.rs
index c9db53e..b8ce835 100644
--- a/systeroid-tui/src/style.rs
+++ b/systeroid-tui/src/style.rs
@@ -31,7 +31,11 @@ impl Colors {
/// Returns the background/foreground colors with default style.
pub fn get_style(&self) -> Style {
- Style::default().bg(self.fg).fg(self.bg)
+ if self.bg == TuiColor::Reset {
+ Style::default().bg(TuiColor::White).fg(TuiColor::Black)
+ } else {
+ Style::default().bg(self.fg).fg(self.bg)
+ }
}
/// Returns the background color with default style.