W10: Active panel focus indicator bar

Add a bright accent-coloured 1-column bar on the inner left edge
of the active panel. This is a premium TUI pattern (also used by
bottom, lazygit, btop) that gives a much clearer visual focus
indicator than a border colour change alone.

The bar uses the same active_border_color as the panel border so
it stays thematically consistent. The panel inner content shifts
right by one column to accommodate the bar without losing content.

Tests: 1388 pass, zero warnings.
This commit is contained in:
2026-07-06 15:23:38 +03:00
parent 203c40ab53
commit dc32c6ccbf
@@ -320,6 +320,21 @@ impl FileManager {
return;
}
if active && inner.width >= 3 {
let bar = Paragraph::new(Span::styled(
" ",
Style::default().bg(active_border_color),
));
let mut bar_area = inner;
bar_area.width = 1;
frame.render_widget(bar, bar_area);
}
let inner = if active && inner.width >= 3 {
Rect::new(inner.x + 1, inner.y, inner.width - 1, inner.height)
} else {
inner
};
let show_meta = inner.height >= 3;
let show_footer = inner.height >= 2;
let body_y = inner.y + u16::from(show_meta);