From dc32c6ccbfab791374fbd455887d5979a32cdd51 Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 6 Jul 2026 15:23:38 +0300 Subject: [PATCH] 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. --- .../tui/tlc/source/src/filemanager/render.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/local/recipes/tui/tlc/source/src/filemanager/render.rs b/local/recipes/tui/tlc/source/src/filemanager/render.rs index 4a1425818a..25bd7444c4 100644 --- a/local/recipes/tui/tlc/source/src/filemanager/render.rs +++ b/local/recipes/tui/tlc/source/src/filemanager/render.rs @@ -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);