diff --git a/src/qml/ElisaMainWindow.qml b/src/qml/ElisaMainWindow.qml --- a/src/qml/ElisaMainWindow.qml +++ b/src/qml/ElisaMainWindow.qml @@ -404,31 +404,31 @@ anchors.fill: parent - BusyIndicator { - id: busyScanningMusic - hoverEnabled: false + Loader { anchors.fill: parent anchors.leftMargin: parent.width / 3 anchors.rightMargin: parent.width / 3 anchors.topMargin: parent.height / 3 anchors.bottomMargin: parent.height / 3 - opacity: 0.8 + z: 2 - visible: running + sourceComponent: BusyIndicator { + id: busyScanningMusic + hoverEnabled: false - z: 2 - } + anchors.fill: parent - Loader { - sourceComponent: Binding { - target: busyScanningMusic - property: 'running' - value: elisa.musicManager.indexerBusy + opacity: 0.8 + + visible: true + running: true + + z: 2 } - active: elisa.musicManager !== undefined + active: elisa.musicManager.indexerBusy } MediaBrowser { diff --git a/src/qml/PlayListEntry.qml b/src/qml/PlayListEntry.qml --- a/src/qml/PlayListEntry.qml +++ b/src/qml/PlayListEntry.qml @@ -340,55 +340,15 @@ 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 - - SequentialAnimation on opacity { - running: isPlaying == MediaPlayList.IsPlaying && playListEntry.state != 'hoveredOrSelected' - loops: Animation.Infinite - - NumberAnimation { - from: 0 - to: 1. - duration: 1000 - easing.type: Easing.InOutCubic - } - 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 - } - } + visible: opacity > 0.0 } } @@ -438,6 +398,10 @@ target: playPauseButton opacity: 0 } + PropertyChanges { + target: playIcon + opacity: (isPlaying === MediaPlayList.IsPlaying ? 1.0 : 0.0) + } PropertyChanges { target: entryBackground color: (isAlternateColor ? myPalette.alternateBase : myPalette.base) @@ -458,6 +422,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)