From c222247811c588fd1842f80f5f508d37d3b7412d Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Tue, 1 Oct 2024 21:28:04 +0530 Subject: [PATCH] Add colors for nm cmds --- tui/src/state.rs | 12 ++++++++++-- tui/src/theme.rs | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tui/src/state.rs b/tui/src/state.rs index a7ec0bb5c..bf9cc2eb6 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -332,7 +332,11 @@ impl AppState { node.name, indicator )) - .style(self.theme.cmd_color()) + .style(if self.multi_select && !node.multi_select { + self.theme.nm_cmd_color() + } else { + self.theme.cmd_color() + }) .patch_style(style) } }, @@ -347,7 +351,11 @@ impl AppState { } else { Line::from(format!("{} ", node.task_list)) .alignment(Alignment::Right) - .style(self.theme.cmd_color()) + .style(if self.multi_select && !node.multi_select { + self.theme.nm_cmd_color() + } else { + self.theme.cmd_color() + }) .bold() } }, diff --git a/tui/src/theme.rs b/tui/src/theme.rs index 8337645a2..b3d1b7e05 100644 --- a/tui/src/theme.rs +++ b/tui/src/theme.rs @@ -28,6 +28,13 @@ impl Theme { } } + pub fn nm_cmd_color(&self) -> Color { + match self { + Theme::Default => Color::DarkGray, + Theme::Compatible => Color::DarkGray, + } + } + pub fn tab_color(&self) -> Color { match self { Theme::Default => Color::Rgb(255, 255, 85),