diff options
| author | adamdottv <[email protected]> | 2025-04-28 08:46:09 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-04-30 07:46:34 -0500 |
| commit | 61b605e724eb4cc50ab831534fcdd18e031d68eb (patch) | |
| tree | b15b074a8fed1931e179a8d3df08d05b753c7aa3 /internal/tui/components/dialog/quit.go | |
| parent | 61d9dc95111d2645a49816f6d9d6cc1014be1a22 (diff) | |
| download | opencode-61b605e724eb4cc50ab831534fcdd18e031d68eb.tar.gz opencode-61b605e724eb4cc50ab831534fcdd18e031d68eb.zip | |
feat: themes
Diffstat (limited to 'internal/tui/components/dialog/quit.go')
| -rw-r--r-- | internal/tui/components/dialog/quit.go | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/internal/tui/components/dialog/quit.go b/internal/tui/components/dialog/quit.go index 38c7dc1a1..f755fa272 100644 --- a/internal/tui/components/dialog/quit.go +++ b/internal/tui/components/dialog/quit.go @@ -8,6 +8,7 @@ import ( "github.com/charmbracelet/lipgloss" "github.com/opencode-ai/opencode/internal/tui/layout" "github.com/opencode-ai/opencode/internal/tui/styles" + "github.com/opencode-ai/opencode/internal/tui/theme" "github.com/opencode-ai/opencode/internal/tui/util" ) @@ -81,16 +82,19 @@ func (q *quitDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (q *quitDialogCmp) View() string { - yesStyle := styles.BaseStyle - noStyle := styles.BaseStyle - spacerStyle := styles.BaseStyle.Background(styles.Background) + t := theme.CurrentTheme() + baseStyle := styles.BaseStyle() + + yesStyle := baseStyle + noStyle := baseStyle + spacerStyle := baseStyle.Background(t.Background()) if q.selectedNo { - noStyle = noStyle.Background(styles.PrimaryColor).Foreground(styles.Background) - yesStyle = yesStyle.Background(styles.Background).Foreground(styles.PrimaryColor) + noStyle = noStyle.Background(t.Primary()).Foreground(t.Background()) + yesStyle = yesStyle.Background(t.Background()).Foreground(t.Primary()) } else { - yesStyle = yesStyle.Background(styles.PrimaryColor).Foreground(styles.Background) - noStyle = noStyle.Background(styles.Background).Foreground(styles.PrimaryColor) + yesStyle = yesStyle.Background(t.Primary()).Foreground(t.Background()) + noStyle = noStyle.Background(t.Background()).Foreground(t.Primary()) } yesButton := yesStyle.Padding(0, 1).Render("Yes") @@ -104,7 +108,7 @@ func (q *quitDialogCmp) View() string { buttons = spacerStyle.Render(strings.Repeat(" ", remainingWidth)) + buttons } - content := styles.BaseStyle.Render( + content := baseStyle.Render( lipgloss.JoinVertical( lipgloss.Center, question, @@ -113,10 +117,10 @@ func (q *quitDialogCmp) View() string { ), ) - return styles.BaseStyle.Padding(1, 2). + return baseStyle.Padding(1, 2). Border(lipgloss.RoundedBorder()). - BorderBackground(styles.Background). - BorderForeground(styles.ForgroundDim). + BorderBackground(t.Background()). + BorderForeground(t.TextMuted()). Width(lipgloss.Width(content) + 4). Render(content) } |
