mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
Add colors for nm cmds
This commit is contained in:
parent
8edd12f0b4
commit
3796c7abdb
|
@ -315,7 +315,12 @@ impl AppState {
|
|||
let (indicator, style) = if is_selected {
|
||||
(self.theme.multi_select_icon(), Style::default().bold())
|
||||
} else {
|
||||
("", Style::new())
|
||||
let ms_style = if self.multi_select && !node.multi_select {
|
||||
Style::default().fg(self.theme.multi_select_disabled_color())
|
||||
} else {
|
||||
Style::new()
|
||||
};
|
||||
("", ms_style)
|
||||
};
|
||||
if *has_children {
|
||||
Line::from(format!(
|
||||
|
@ -325,6 +330,7 @@ impl AppState {
|
|||
indicator
|
||||
))
|
||||
.style(self.theme.dir_color())
|
||||
.patch_style(style)
|
||||
} else {
|
||||
Line::from(format!(
|
||||
"{} {} {}",
|
||||
|
@ -342,13 +348,21 @@ impl AppState {
|
|||
|ListEntry {
|
||||
node, has_children, ..
|
||||
}| {
|
||||
let ms_style = if self.multi_select && !node.multi_select {
|
||||
Style::default().fg(self.theme.multi_select_disabled_color())
|
||||
} else {
|
||||
Style::new()
|
||||
};
|
||||
if *has_children {
|
||||
Line::from(" ").style(self.theme.dir_color())
|
||||
Line::from(" ")
|
||||
.style(self.theme.dir_color())
|
||||
.patch_style(ms_style)
|
||||
} else {
|
||||
Line::from(format!("{} ", node.task_list))
|
||||
.alignment(Alignment::Right)
|
||||
.style(self.theme.cmd_color())
|
||||
.bold()
|
||||
.patch_style(ms_style)
|
||||
}
|
||||
},
|
||||
));
|
||||
|
|
|
@ -28,6 +28,13 @@ impl Theme {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn multi_select_disabled_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),
|
||||
|
|
Loading…
Reference in New Issue
Block a user