Fix metadata panel background fill alignment
This commit is contained in:
parent
5a27141298
commit
715cbd6e37
1 changed files with 3 additions and 0 deletions
|
|
@ -1377,13 +1377,16 @@ func renderMetadata(meta vfs.Metadata, palette theme.Palette, width int) string
|
||||||
leftWidth = innerWidth
|
leftWidth = innerWidth
|
||||||
}
|
}
|
||||||
rightWidth := max(innerWidth-leftWidth, 0)
|
rightWidth := max(innerWidth-leftWidth, 0)
|
||||||
|
columnHeight := max(len(leftRows), len(rightRows))
|
||||||
left := lipgloss.NewStyle().
|
left := lipgloss.NewStyle().
|
||||||
Width(leftWidth).
|
Width(leftWidth).
|
||||||
|
Height(columnHeight).
|
||||||
Background(palette.PanelElevated).
|
Background(palette.PanelElevated).
|
||||||
Foreground(palette.Muted).
|
Foreground(palette.Muted).
|
||||||
Render(strings.Join(leftRows, "\n"))
|
Render(strings.Join(leftRows, "\n"))
|
||||||
right := lipgloss.NewStyle().
|
right := lipgloss.NewStyle().
|
||||||
Width(rightWidth).
|
Width(rightWidth).
|
||||||
|
Height(columnHeight).
|
||||||
Background(palette.PanelElevated).
|
Background(palette.PanelElevated).
|
||||||
Foreground(palette.Text).
|
Foreground(palette.Text).
|
||||||
Render(strings.Join(rightRows, "\n"))
|
Render(strings.Join(rightRows, "\n"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue