summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorRichard Menzies <rdmenzies2000@gmail.com>2020-11-13 13:36:27 +0000
committerStephan Dilly <dilly.stephan@gmail.com>2020-12-08 01:42:41 +0100
commitf3b7b0ffac8ec3533e72f2e17d262fb862b6d612 (patch)
tree48dd47c22c3a2965b22fe01e284011442e21fb1f /src/ui
parentc37f229070f964ba32e5ec4e64b68675c987bf54 (diff)
Use theme for push gauge
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/style.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/style.rs b/src/ui/style.rs
index 8708dc01..d09727c5 100644
--- a/src/ui/style.rs
+++ b/src/ui/style.rs
@@ -47,6 +47,10 @@ pub struct Theme {
commit_author: Color,
#[serde(with = "Color")]
danger_fg: Color,
+ #[serde(with = "Color")]
+ push_gauge_bg: Color,
+ #[serde(with = "Color")]
+ push_gauge_fg: Color,
}
impl Theme {
@@ -220,6 +224,12 @@ impl Theme {
)
}
+ pub fn push_gauge(&self) -> Style {
+ Style::default()
+ .fg(self.push_gauge_fg)
+ .bg(self.push_gauge_bg)
+ }
+
fn save(&self) -> Result<()> {
let theme_file = Self::get_theme_file()?;
let mut file = File::create(theme_file)?;
@@ -276,6 +286,8 @@ impl Default for Theme {
commit_time: Color::LightCyan,
commit_author: Color::Green,
danger_fg: Color::Red,
+ push_gauge_bg: Color::White,
+ push_gauge_fg: Color::Red,
}
}
}