Fix directory preview layout to exactly match browser pane columns

Root cause: renderPreviewPane() was stuffing directory entries into the
viewport model via SetContent(), then rendering through
renderPreviewContent() which wraps the viewport in an additional
border+padding box. This reduced the effective content width by 4
characters compared to the browser pane's innerWidth (width-2), causing
column misalignment where the date column would wrap to the next line.

Fix: For directory previews, directly render entries using the same
renderPaneRows() and renderColumnsHeader() functions as the browser
pane, at the same innerWidth. A temporary BrowserPane is created with
the directory entries, and renderPaneRows() is called with active=false,
producing pixel-identical output to the main file browser.

Removed renderDirectoryPreviewBody() which is no longer needed.
This commit is contained in:
vrubelroman 2026-04-27 16:52:44 +03:00
parent db5eaba409
commit bba8783f10
3 changed files with 22 additions and 7 deletions

View file

@ -4,7 +4,7 @@ right_path = ''
[ui]
app_title = 'vcom'
theme = 'vesper'
theme = 'ayu-dark'
icon_mode = 'auto'
show_title_bar = true
show_footer = true