qml: use AnimatedBackground in Artist list

This commit is contained in:
Prince Gupta 2021-07-23 20:14:24 +05:30 committed by Hugo Beauzée-Luyssen
parent 712e5f2dc0
commit e0e7911a05
1 changed files with 5 additions and 3 deletions

View File

@ -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