diff --git a/ui/browsing/nowplayingpage.go b/ui/browsing/nowplayingpage.go index 57b1f15b..8005f89d 100644 --- a/ui/browsing/nowplayingpage.go +++ b/ui/browsing/nowplayingpage.go @@ -262,6 +262,18 @@ func (a *NowPlayingPage) Route() controller.Route { return controller.NowPlayingRoute("") } +var _ Scrollable = (*NowPlayingPage)(nil) + +func (a *NowPlayingPage) Scroll(delta float32) { + switch a.tabs.SelectedIndex() { + case 0: /*play queue*/ + a.queueList.Scroll(delta) + case 1: /*lyrics*/ + case 2: /*related*/ + a.relatedList.Scroll(delta) + } +} + var _ CanShowNowPlaying = (*NowPlayingPage)(nil) func (a *NowPlayingPage) OnSongChange(song mediaprovider.MediaItem, lastScrobbledIfAny *mediaprovider.Track) { diff --git a/ui/widgets/playqueuelist.go b/ui/widgets/playqueuelist.go index e3e0c244..02e42ae7 100644 --- a/ui/widgets/playqueuelist.go +++ b/ui/widgets/playqueuelist.go @@ -164,6 +164,10 @@ func (p *PlayQueueList) UnselectAll() { p.list.Refresh() } +func (p *PlayQueueList) Scroll(amount float32) { + p.list.ScrollToOffset(p.list.GetScrollOffset() + amount) +} + func (p *PlayQueueList) Refresh() { p.list.EnableDragging = p.Reorderable p.BaseWidget.Refresh()