From 6cfaa65450c92bb5f78dfbca98d27e3ff8119105 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 16 Feb 2022 14:54:20 -0500 Subject: [PATCH] fix colors if not using dark mode --- src/lib.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c7c8c4a..2fb37aa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -116,13 +116,11 @@ impl ChartManager { .y_label_area_size(30.0) .build_cartesian_2d(self.min_x..self.max_x, self.min_y..self.max_y)?; - let light_line_color = if dark_mode { - RGBColor(254, 254, 254) + if dark_mode { + chart.configure_mesh().x_labels(3).y_labels(3).light_line_style(&RGBColor(254, 254, 254)).draw()?; } else { - RGBColor(28, 28, 28) - }; - - chart.configure_mesh().x_labels(3).y_labels(3).light_line_style(&light_line_color).draw()?; + chart.configure_mesh().x_labels(3).y_labels(3).draw()?; + } let absrange = (self.max_x - self.min_x).abs(); let data: Vec<(f32, f32)> = match self.back_cache.is_valid() {