add (non-focused) keyboard scrolling to grid view pages

This commit is contained in:
Drew Weymouth
2024-02-18 09:10:01 -08:00
parent 74a8aea72c
commit c6687aaa95
7 changed files with 92 additions and 21 deletions
+9
View File
@@ -82,6 +82,15 @@ func newPlaylistsPage(contr *controller.Controller, pool *util.WidgetPool, cfg *
return a
}
var _ Scrollable = (*PlaylistsPage)(nil)
func (p *PlaylistsPage) Scroll(scrollAmt float32) {
if p.viewToggle.ActivatedButtonIndex() == 1 && p.gridView != nil {
p.gridView.ScrollToOffset(p.gridView.GetScrollOffset() + scrollAmt)
p.gridView.Refresh()
}
}
func (a *PlaylistsPage) load(searchOnLoad bool) {
playlists, err := a.mp.GetPlaylists()
if err != nil {