lib: Use container focus for table highlighting

This commit is contained in:
Erik Kundt
2024-06-17 12:07:30 +02:00
parent 0954d14a00
commit 31e4a2bb42
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -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()
}
}
}
+1 -1
View File
@@ -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 {