From 675f6d544e62a656581408b7dbefa2e7a4d5c92a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 6 Mar 2026 16:47:40 +0200 Subject: refactor: use common panel style directly in tui (task 382) --- internal/tui/styles.go | 4 ---- internal/tui/tui.go | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/tui/styles.go b/internal/tui/styles.go index 9f7a16a..5452e57 100644 --- a/internal/tui/styles.go +++ b/internal/tui/styles.go @@ -26,9 +26,6 @@ var ( // TabInactiveStyle is applied to non-selected tabs. TabInactiveStyle = common.TabInactiveStyle - // PanelStyle is used for boxed sections. - PanelStyle = common.PanelStyle - // HelpBarStyle is used for keybinding hints at the bottom. HelpBarStyle = common.HelpBarStyle @@ -52,7 +49,6 @@ func syncStylesFromCommon() { HeaderStyle = common.HeaderStyle TabActiveStyle = common.TabActiveStyle TabInactiveStyle = common.TabInactiveStyle - PanelStyle = common.PanelStyle HelpBarStyle = common.HelpBarStyle HighlightStyle = common.HighlightStyle ErrorStyle = common.ErrorStyle diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 4051508..774be12 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -740,7 +740,7 @@ func (m Model) View() tea.View { if m.attaching { line := fmt.Sprintf("%s Attaching tracepoints...", m.spin.View()) - return altScreenView(placeToViewport(width, height, ScreenStyle.Render(PanelStyle.Render(line))), title) + return altScreenView(placeToViewport(width, height, ScreenStyle.Render(common.PanelStyle.Render(line))), title) } if m.lastErr != nil { @@ -837,7 +837,7 @@ func renderHelpOverlay(width, height int, groups [][]key.Binding) string { boxWidth = 72 } - box := PanelStyle.Copy(). + box := common.PanelStyle.Copy(). Width(boxWidth). Render(strings.Join(lines, "\n")) @@ -932,7 +932,7 @@ func renderGlobalHelpOverlay(width, height int, sections []helpSection) string { lines = append(lines, truncateHelpLine("... (resize for full help)", contentWidth)) } - box := PanelStyle.Copy().Width(boxWidth).Render(strings.Join(lines, "\n")) + box := common.PanelStyle.Copy().Width(boxWidth).Render(strings.Join(lines, "\n")) return lipgloss.Place(width, height, lipgloss.Center, lipgloss.Center, box) } -- cgit v1.2.3