change playingbar to fixed size so progressbar and lyric won't disappear when font is too large

This commit is contained in:
tramhao 2021-03-03 02:13:47 +08:00
parent 3cb145cf10
commit ace95a0b45
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ func (p *PlayingBar) run() error {
gomu.app.QueueUpdateDraw(func() {
p.text.Clear()
p.text.SetText(fmt.Sprintf("%s ┃%s┫ %s\n%v",
p.text.SetText(fmt.Sprintf("%s ┃%s┫ %s\n\n%v",
fmtDuration(start),
progressBar,
fmtDuration(end),

View File

@ -274,7 +274,7 @@ func layout(gomu *Gomu) *tview.Flex {
AddItem(gomu.playlist, 0, 1, false).
AddItem(tview.NewFlex().SetDirection(tview.FlexRow).
AddItem(gomu.queue, 0, 5, false).
AddItem(gomu.playingBar, 0, 1, false), 0, 3, false)
AddItem(gomu.playingBar, 9, 0, false), 0, 3, false)
return flex
}