Skip to content

Commit

Permalink
fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Aug 22, 2023
1 parent 22b6d76 commit 0316431
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ui/hey/style/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ const (
BgColor = "#191414"
)

func ChatNomal(width, height int) lipgloss.Style {
func RecommendationNormal(width, height int) lipgloss.Style {
return lipgloss.NewStyle().
Width(width).
Height(height).
BorderStyle(lipgloss.HiddenBorder())
}

func ChatFocused(width, height int) lipgloss.Style {
func RecommendationFocused(width, height int) lipgloss.Style {
return lipgloss.NewStyle().
Width(width).
Height(height).
BorderStyle(lipgloss.ThickBorder()).
BorderForeground(lipgloss.Color(HighlightColor))
}

func RecommendationNormal(width, height int) lipgloss.Style {
func ChatNormal(width, height int) lipgloss.Style {
return lipgloss.NewStyle().
Width(width).
Height(height).
BorderStyle(lipgloss.HiddenBorder()).
Background(lipgloss.AdaptiveColor{Dark: BgColor, Light: BgColor})
}

func RecommendationFocused(width, height int) lipgloss.Style {
func ChatFocused(width, height int) lipgloss.Style {
return lipgloss.NewStyle().
Width(width).
Height(height).
Expand Down
8 changes: 4 additions & 4 deletions ui/hey/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ func (m Model) View() string {
s += lipgloss.Place(m.window.Width, m.window.Height, lipgloss.Center, lipgloss.Center,
lipgloss.JoinHorizontal(
lipgloss.Center,
style.RecommendationFocused(m.getViewWidth(), m.getViewHeight()).Render(m.chatView()),
style.ChatNomal(m.getViewWidth(), m.getViewHeight()).Render(m.recommendationView()),
style.ChatFocused(m.getViewWidth(), m.getViewHeight()).Render(m.chatView()),
style.RecommendationNormal(m.getViewWidth(), m.getViewHeight()).Render(m.recommendationView()),
),
)
} else {
s += lipgloss.Place(m.window.Width, m.window.Height, lipgloss.Center, lipgloss.Center,
lipgloss.JoinHorizontal(
lipgloss.Center,
style.RecommendationNormal(m.getViewWidth(), m.getViewHeight()).Render(m.chatView()),
style.ChatFocused(m.getViewWidth(), m.getViewHeight()).Render(m.recommendationView()),
style.ChatNormal(m.getViewWidth(), m.getViewHeight()).Render(m.chatView()),
style.RecommendationFocused(m.getViewWidth(), m.getViewHeight()).Render(m.recommendationView()),
),
)
}
Expand Down

0 comments on commit 0316431

Please sign in to comment.