diff --git a/src/qml/PlayListEntry.qml b/src/qml/PlayListEntry.qml --- a/src/qml/PlayListEntry.qml +++ b/src/qml/PlayListEntry.qml @@ -340,51 +340,18 @@ opacity: 0 - source: (isPlaying == MediaPlayList.IsPlaying ? Qt.resolvedUrl(elisaTheme.playIcon) : Qt.resolvedUrl(elisaTheme.pauseIcon)) + source: Qt.resolvedUrl(elisaTheme.playIndicatorIcon) width: parent.height * 1. height: parent.height * 1. sourceSize.width: parent.height * 1. sourceSize.height: parent.height * 1. fillMode: Image.PreserveAspectFit mirror: LayoutMirroring.enabled - visible: isPlaying == MediaPlayList.IsPlaying || isPlaying == MediaPlayList.IsPaused + visible: opacity > 0.0 - SequentialAnimation on opacity { - running: isPlaying == MediaPlayList.IsPlaying && playListEntry.state != 'hoveredOrSelected' - loops: Animation.Infinite - - NumberAnimation { - from: 0 - to: 1. - duration: 1000 - easing.type: Easing.InOutCubic - } + Behavior on opacity { NumberAnimation { - from: 1 - to: 0 - duration: 1000 - easing.type: Easing.InOutCubic - } - } - - SequentialAnimation on opacity { - running: isPlaying == MediaPlayList.IsPaused && playListEntry.state != 'hoveredOrSelected' - - NumberAnimation { - from: playIcon.opacity - to: 1. - duration: 1000 - easing.type: Easing.InOutCubic - } - } - - SequentialAnimation on opacity { - running: playListEntry.state == 'hoveredOrSelected' - - NumberAnimation { - from: playIcon.opacity - to: 0 duration: 250 easing.type: Easing.InOutCubic } @@ -438,6 +405,10 @@ target: playPauseButton opacity: 0 } + PropertyChanges { + target: playIcon + opacity: ((isPlaying === MediaPlayList.IsPlaying || isPlaying === MediaPlayList.IsPaused) ? 1.0 : 0.0) + } PropertyChanges { target: entryBackground color: (isAlternateColor ? myPalette.alternateBase : myPalette.base) @@ -458,6 +429,10 @@ target: infoButton opacity: 1 } + PropertyChanges { + target: playIcon + opacity: 0 + } PropertyChanges { target: entryBackground color: myPalette.mid diff --git a/src/qml/Theme.qml b/src/qml/Theme.qml --- a/src/qml/Theme.qml +++ b/src/qml/Theme.qml @@ -43,6 +43,7 @@ property string ratingIcon: 'image://icon/rating' property string ratingUnratedIcon: 'image://icon/rating-unrated' property string errorIcon: 'image://icon/error' + property string playIndicatorIcon: 'image://icon/audio-volume-high' property int layoutHorizontalMargin: dp(8) property int layoutVerticalMargin: dp(6)