From f0e5ad168880f9bdae2a85a21b59440e3329a3e4 Mon Sep 17 00:00:00 2001 From: Ilya Glebov Date: Wed, 31 Dec 2025 15:01:18 +0100 Subject: [PATCH] Fix pause icon rendering on Windows --- internal/ui/footer.go | 2 +- internal/ui/stations.go | 4 ++-- internal/ui/ui.go | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/internal/ui/footer.go b/internal/ui/footer.go index e7a96f9..639add3 100644 --- a/internal/ui/footer.go +++ b/internal/ui/footer.go @@ -123,7 +123,7 @@ func (s *StatusRenderer) renderPlaying() string { } func (s *StatusRenderer) renderPaused() string { - parts := []string{"⏸︎ PAUSED"} + parts := []string{PauseIcon + " PAUSED"} if s.isMuted { parts = append(parts, "[red]MUTED[-]") diff --git a/internal/ui/stations.go b/internal/ui/stations.go index b64eb42..df7a0b8 100644 --- a/internal/ui/stations.go +++ b/internal/ui/stations.go @@ -93,7 +93,7 @@ func (ui *UI) setStationRow(table *tview.Table, row int, stationIndex int) { playIcon := " " if stationIndex == ui.playingIndex { if ui.player.IsPaused() { - playIcon = "⏸" + playIcon = PauseIcon } else { playIcon = "➤" } @@ -270,7 +270,7 @@ func (ui *UI) updateStationListPlayingIndicator() { playCell := ui.stationList.GetCell(row, 1) if playCell != nil { if ui.player.IsPaused() { - playCell.SetText("⏸") + playCell.SetText(PauseIcon) } else { playCell.SetText("➤") } diff --git a/internal/ui/ui.go b/internal/ui/ui.go index 19a87a7..3e2f26f 100644 --- a/internal/ui/ui.go +++ b/internal/ui/ui.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "runtime" "strings" "sync" "time" @@ -28,6 +29,14 @@ const ( FooterBreakpoint = 130 // Width threshold for responsive footer ) +// PauseIcon uses platform-specific character (Windows renders ⏸ as emoji) +var PauseIcon = func() string { + if runtime.GOOS == "windows" { + return "❚❚" + } + return "⏸" +}() + type UI struct { app *tview.Application stationService *service.StationService