Skip to content

Commit

Permalink
fix: player view
Browse files Browse the repository at this point in the history
  • Loading branch information
anhoder committed Sep 3, 2023
1 parent fa4a984 commit b16ebae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ui/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ func NewPlayer(netease *Netease) *Player {
func (p *Player) Update(_ tea.Msg, _ *model.App) {
var main = p.netease.MustMain()
// 播放器歌词
spaceHeight := p.netease.WindowHeight() - 4 - main.MenuBottomRow()
spaceHeight := p.netease.WindowHeight() - 5 - main.SearchBarBottomRow()
if spaceHeight < 4 || !configs.ConfigRegistry.MainShowLyric {
// 不显示歌词
p.showLyric = false
} else {
p.showLyric = true
if spaceHeight > 6 {
// 5行歌词
p.lyricStartRow = (p.netease.WindowHeight()-3+main.MenuBottomRow())/2 - 3
p.lyricStartRow = (p.netease.WindowHeight()-3+main.SearchBarBottomRow())/2 - 3
p.lyricLines = 5
} else {
// 3行歌词
p.lyricStartRow = (p.netease.WindowHeight()-3+main.MenuBottomRow())/2 - 2
p.lyricStartRow = (p.netease.WindowHeight()-3+main.SearchBarBottomRow())/2 - 2
p.lyricLines = 3
}
}
Expand Down

0 comments on commit b16ebae

Please sign in to comment.