Touch UI: Draw playback progress indicator for EpisodeItem

This commit is contained in:
Thomas Perl 2014-02-02 16:21:16 +01:00
parent f58460b505
commit 7f5aa932f7

View file

@ -20,10 +20,11 @@
import QtQuick 2.0
import 'constants.js' as Constants
import 'common/constants.js' as Constants
ButtonArea {
id: podcastItem
property bool isPlaying: ((player.episode == id) && player.isPlaying)
Rectangle {
anchors {
@ -31,11 +32,24 @@ ButtonArea {
bottom: parent.bottom
left: parent.left
}
width: parent.width * progress
color: Constants.colors.download
opacity: .4
}
Rectangle {
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
}
width: parent.width * playbackProgress
color: Constants.colors.playback
opacity: isPlaying ? .6 : .2
}
transparent: true
height: 80 * pgst.scalef