diff --git a/src/ui/theme.rs b/src/ui/theme.rs index 9b38b66e..980e5c4e 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -49,7 +49,11 @@ pub mod style { } } - pub fn highlight() -> Style { - cyan().not_dim().reversed() + pub fn highlight(focus: bool) -> Style { + if focus { + cyan().not_dim().reversed() + } else { + cyan().dim().reversed() + } } } diff --git a/src/ui/widget/list.rs b/src/ui/widget/list.rs index ebca9a35..edad9174 100644 --- a/src/ui/widget/list.rs +++ b/src/ui/widget/list.rs @@ -249,7 +249,7 @@ where .rows(rows) .widths(widths) .column_spacing(1) - .highlight_style(style::highlight()); + .highlight_style(style::highlight(render.focus)); frame.render_stateful_widget(rows, render.area, &mut self.state); } else {