Skip to content

Commit

Permalink
chore(player): Update deprecated function call
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Nov 13, 2024
1 parent be91732 commit e8b8ccb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/player/styles.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package player

import (
"os"

"gabe565.com/ascii-movie/internal/movie"
"github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv"
Expand All @@ -22,13 +24,12 @@ func NewStyles(m *movie.Movie, renderer *lipgloss.Renderer) Styles {
optionsColor := lipgloss.AdaptiveColor{Light: "7", Dark: "8"}
selectedColor := lipgloss.AdaptiveColor{Light: "12", Dark: "4"}

isTTY := renderer.Output().TTY() != nil
screenStyle := renderer.NewStyle().
Width(m.Width).
Height(m.Height).
Border(lipgloss.RoundedBorder()).
BorderForeground(borderColor)
if isTTY {
if _, isTTY := renderer.Output().Writer().(*os.File); isTTY {
screenStyle = screenStyle.Foreground(lipgloss.AdaptiveColor{Light: "0", Dark: "15"})
}

Expand Down

0 comments on commit e8b8ccb

Please sign in to comment.