Draft: qml: Artist albums list view enhancement
The Albums list view has been modified to support a more intuitive list layout as found in many other apps like Spotify etc.
Features
These are the main features and changes of this enhancement:
- A new section delegate which shows the album cover along with play, enqueue and navigation buttons.
- When scrolling if an album is too large and the user scrolls down the album section delegate is pinned/stuck to the top of the list until the user reaches another album.
- A light frosted glass effect to the delegate's background cover.
- Quick jumping between albums using Prev/Next Navigation buttons provided in the new delegate.
Changes
- Changes to MusicArtist.qml to include the new list view and support for keyboard navigation.
- MusicTracksListDisplay component is reused and a small modification added to prevent overriding of sort criteria.
- 2 properties have been added to TableViewExt,
forceShowDefaultHeaderandmanualSortDisbledwhich are utilized in the new list component inMusicArtist. - Sort model for list view does not include "Release Date" as of now due to limitations of sorting parameters available with
mlaudiomodel, So I've disabled the option for list view but it still can be used normally in grid view. - Added a new field to the
mlaudiomodel.ALBUM_IDas this parameter is required to get the relevant data from the album model to be shown in the section delegate. - Added a new method
getAlbumDataFromIdto get the album data from qml using the album id (integer). The current available method only seem to work for MLItemId so this was needed to use an integer value for album id which is whatALBUM_IDinmlaudiomodelgives.
Limitations
- Sorting is currently limited to alphabetic order only.
- Due to the way Qt seems to handle sections the scroll bar sometimes jump when new section come in view as the contentHeight is determined again which affects the scroll bar. Scrolling with mouse wheel does not have any issues.
Screenshots
Short Video
Edited by Arpit Benjamin


