From e0e7911a055e055b0653d3bb169acdd2baa89860 Mon Sep 17 00:00:00 2001 From: Prince Gupta Date: Fri, 23 Jul 2021 20:14:24 +0530 Subject: [PATCH] qml: use AnimatedBackground in Artist list --- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml index ab074fb502..8fad24ab92 100644 --- a/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml +++ b/modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml @@ -138,14 +138,16 @@ FocusScope { topPadding: VLCStyle.margin_xlarge } - delegate: Rectangle { + delegate: Widgets.AnimatedBackground { id: item property bool _highlighted: mouseArea.containsMouse || this.activeFocus height: VLCStyle.play_cover_small + (VLCStyle.margin_xsmall * 2) width: artistList.width - color: _highlighted ? VLCStyle.colors.bgHover : "transparent" + active: false + backgroundColor: _highlighted ? VLCStyle.colors.bgHover : "transparent" + foregroundColor: _highlighted ? VLCStyle.colors.bgHoverText : VLCStyle.colors.text Widgets.CurrentIndicator { visible: item.ListView.isCurrentItem @@ -180,7 +182,7 @@ FocusScope { Widgets.ListLabel { text: model.name || i18n.qtr("Unknown artist") - color: _highlighted ? VLCStyle.colors.bgHoverText : VLCStyle.colors.text + color: item.foregroundColor Layout.fillWidth: true Layout.fillHeight: true