From 8046421e7c47b8a7cc8775589ce150e05f3a2cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= <1224732+snonux@users.noreply.github.com> Date: Sat, 21 Jun 2025 20:02:42 +0300 Subject: Move column header to cell view --- internal/ui/table.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'internal/ui') diff --git a/internal/ui/table.go b/internal/ui/table.go index dd862a5..fd9ee8f 100644 --- a/internal/ui/table.go +++ b/internal/ui/table.go @@ -549,12 +549,7 @@ func (m Model) statusLine() string { } func (m Model) topStatusLine() string { - header := "" - cols := m.tbl.Columns() - if idx := m.tbl.ColumnCursor(); idx >= 0 && idx < len(cols) { - header = cols[idx].Title - } - line := fmt.Sprintf("Task Samurai %s | %s", internal.Version, header) + line := fmt.Sprintf("Task Samurai %s", internal.Version) return lipgloss.NewStyle(). Foreground(lipgloss.Color("229")). Background(lipgloss.Color("57")). @@ -767,6 +762,14 @@ func (m Model) expandedCellView() string { } val = strings.Join(anns, "; ") } + header := "" + cols := m.tbl.Columns() + if col >= 0 && col < len(cols) { + header = cols[col].Title + } + if header != "" { + val = header + ": " + val + } style := lipgloss.NewStyle().Width(m.tbl.Width()) return style.Render(val) } -- cgit v1.2.3