diff options
Diffstat (limited to 'packages/tui/internal/layout')
| -rw-r--r-- | packages/tui/internal/layout/container.go | 5 | ||||
| -rw-r--r-- | packages/tui/internal/layout/flex.go | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/tui/internal/layout/container.go b/packages/tui/internal/layout/container.go index 3eda158cc..250034ebc 100644 --- a/packages/tui/internal/layout/container.go +++ b/packages/tui/internal/layout/container.go @@ -3,6 +3,7 @@ package layout import ( tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss/v2" + "github.com/sst/opencode/internal/styles" "github.com/sst/opencode/internal/theme" ) @@ -57,7 +58,7 @@ func (c *container) Update(msg tea.Msg) (tea.Model, tea.Cmd) { func (c *container) View() string { t := theme.CurrentTheme() - style := lipgloss.NewStyle() + style := styles.NewStyle().Background(t.Background()) width := c.width height := c.height @@ -66,8 +67,6 @@ func (c *container) View() string { width = c.maxWidth } - style = style.Background(t.Background()) - // Apply border if any side is enabled if c.borderTop || c.borderRight || c.borderBottom || c.borderLeft { // Adjust width and height for borders diff --git a/packages/tui/internal/layout/flex.go b/packages/tui/internal/layout/flex.go index 35f6ba164..320a95203 100644 --- a/packages/tui/internal/layout/flex.go +++ b/packages/tui/internal/layout/flex.go @@ -3,6 +3,7 @@ package layout import ( tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss/v2" + "github.com/sst/opencode/internal/styles" "github.com/sst/opencode/internal/theme" ) @@ -66,7 +67,7 @@ func (f *flexLayout) View() string { alignment, child.View(), // TODO: make configurable WithBackgroundStyle - lipgloss.WithWhitespaceStyle(lipgloss.NewStyle().Background(t.Background())), + lipgloss.WithWhitespaceStyle(styles.NewStyle().Background(t.Background()).Lipgloss()), ) views = append(views, view) } else { @@ -78,7 +79,7 @@ func (f *flexLayout) View() string { alignment, child.View(), // TODO: make configurable WithBackgroundStyle - lipgloss.WithWhitespaceStyle(lipgloss.NewStyle().Background(t.Background())), + lipgloss.WithWhitespaceStyle(styles.NewStyle().Background(t.Background()).Lipgloss()), ) views = append(views, view) } |
