From 30c955ef113e5e0c99c147ee4e7c8c20b0a7f273 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 5 Mar 2026 19:24:09 +0200 Subject: Migrate UI stack to Bubble Tea v2 --- internal/ui/taskdetail.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/ui/taskdetail.go') diff --git a/internal/ui/taskdetail.go b/internal/ui/taskdetail.go index 1889129..94e2ea9 100644 --- a/internal/ui/taskdetail.go +++ b/internal/ui/taskdetail.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/charmbracelet/lipgloss" + "charm.land/lipgloss/v2" ) // wordWrap wraps text to fit within the specified width, breaking at word boundaries @@ -13,13 +13,13 @@ func wordWrap(text string, width int) []string { if width <= 0 { return []string{text} } - + var lines []string words := strings.Fields(text) if len(words) == 0 { return []string{""} } - + currentLine := words[0] for i := 1; i < len(words); i++ { word := words[i] @@ -34,7 +34,7 @@ func wordWrap(text string, width int) []string { if currentLine != "" { lines = append(lines, currentLine) } - + return lines } @@ -138,7 +138,7 @@ func (m *Model) renderDetailPriorityField(labelStyle, valueStyle lipgloss.Style, if pv == "" { pv = "-" } - ps := valueStyle.Copy() + ps := valueStyle switch t.Priority { case "H": ps = ps.Background(lipgloss.Color(m.theme.PrioHighBG)) @@ -219,7 +219,7 @@ func (m *Model) renderDetailDescription(lines []string, cf int, labelStyle, desc t := m.currentTaskDetail lines = append(lines, "") - ls, vs := labelStyle.Copy(), descStyle.Copy() + ls, vs := labelStyle, descStyle if m.detailBlinkField == cf && m.detailBlinkOn { bg := lipgloss.Color("226") ls = ls.Background(bg).Foreground(lipgloss.Color("0")) @@ -260,7 +260,7 @@ func (m *Model) renderDetailAnnotations(lines []string, cf int, labelStyle, desc return lines } lines = append(lines, "") - ls, vs := labelStyle.Copy(), descStyle.Copy() + ls, vs := labelStyle, descStyle if m.detailFieldIndex == cf { ls = ls.Background(lipgloss.Color(m.theme.SelectedBG)) vs = vs.Background(lipgloss.Color(m.theme.SelectedBG)) -- cgit v1.2.3