Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
lib: Use container focus for table highlighting
Erik Kundt committed 1 year ago
commit 31e4a2bb423526e3cea49e4c7e19ae0faf5ae1ae
parent 0954d14a00c8112cc77e39fd4c289a578b45772f
2 files changed +7 -3
modified 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()
+
        }
    }
}
modified 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 {