fix pop up play queue scroll to now playing

This commit is contained in:
Drew Weymouth
2024-07-27 17:03:46 -07:00
parent 6d6451c6f4
commit 3b918d0ed5
+1 -1
View File
@@ -147,7 +147,6 @@ func (m *Controller) ShowPopUpPlayQueue() {
} }
popUpQueue.SetNowPlaying(npID) popUpQueue.SetNowPlaying(npID)
popUpQueue.UnselectAll() popUpQueue.UnselectAll()
popUpQueue.ScrollToNowPlaying()
title := widget.NewRichTextWithText(lang.L("Play Queue")) title := widget.NewRichTextWithText(lang.L("Play Queue"))
title.Segments[0].(*widget.TextSegment).Style.Alignment = fyne.TextAlignCenter title.Segments[0].(*widget.TextSegment).Style.Alignment = fyne.TextAlignCenter
@@ -172,6 +171,7 @@ func (m *Controller) ShowPopUpPlayQueue() {
fyne.NewSize(canvasSize.Width*0.4, canvasSize.Height*0.5), fyne.NewSize(canvasSize.Width*0.4, canvasSize.Height*0.5),
)) ))
pop.Resize(size) pop.Resize(size)
popUpQueue.ScrollToNowPlaying() // must come after resize
pop.ShowAtPosition(fyne.NewPos( pop.ShowAtPosition(fyne.NewPos(
canvasSize.Width-size.Width-10, canvasSize.Width-size.Width-10,
canvasSize.Height-size.Height-100, canvasSize.Height-size.Height-100,