summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/layout
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-06-26 10:16:07 -0500
committerGitHub <[email protected]>2025-06-26 10:16:07 -0500
commit7d13baadc84d7377a352c6d58ed9deeea2c918be (patch)
tree575b6897431e390ae8bf4b9ccde2803446c6c67a /packages/tui/internal/layout
parentdb24bf87c01d3fff2a9594e55e9fab0d9ef52cfe (diff)
downloadopencode-7d13baadc84d7377a352c6d58ed9deeea2c918be.tar.gz
opencode-7d13baadc84d7377a352c6d58ed9deeea2c918be.zip
feat: default system theme (#419)
Co-authored-by: adamdottv <[email protected]>
Diffstat (limited to 'packages/tui/internal/layout')
-rw-r--r--packages/tui/internal/layout/container.go5
-rw-r--r--packages/tui/internal/layout/flex.go5
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)
}