mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-16 08:20:39 +08:00
lib: Use container focus for table highlighting
This commit is contained in:
+6
-2
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user