From b84ea05c63294cd2c3c5a9329c55e5ed5617d2f7 Mon Sep 17 00:00:00 2001 From: ewy Date: Sat, 2 May 2026 19:31:48 +0200 Subject: be more cool about weird icons --- menu/icon.go | 3 --- menu/source.go | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'menu') diff --git a/menu/icon.go b/menu/icon.go index 2043731..102706e 100644 --- a/menu/icon.go +++ b/menu/icon.go @@ -14,9 +14,6 @@ var ( ) func Icon(input string) string { - if strings.TrimSpace(input) == "" { - return "" - } return IconStyle.Render(input) } diff --git a/menu/source.go b/menu/source.go index 9e0f56a..2d02a5d 100644 --- a/menu/source.go +++ b/menu/source.go @@ -32,6 +32,9 @@ var ( st := lipgloss.NewStyle().Faint(true) return st }) + SourceIconStyle = style.New(func() lipgloss.Style { + return lipgloss.NewStyle().Width(3) + }) ) func (m *Model) Source(src *model.HydratedSource) string { @@ -52,7 +55,7 @@ func (m *Model) Source(src *model.HydratedSource) string { targetContent := lipgloss.JoinVertical(lipgloss.Top, targets...) - icon := PaddedIcon(src.Icon) + icon := SourceIconStyle.Render(PaddedIcon(src.Icon)) parts := []string{ SourceHeaderStyle.Render(lipgloss.JoinHorizontal(lipgloss.Left, SourceLabelStyle.Render(lipgloss.JoinHorizontal(lipgloss.Left, icon, src.Label()), SourcePathStyle.Render(src.ShortPath())))), -- cgit v1.3.1