Touch UI: Draw playback progress indicator for EpisodeItem
This commit is contained in:
parent
f58460b505
commit
7f5aa932f7
1 changed files with 15 additions and 1 deletions
|
@ -20,10 +20,11 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
import 'constants.js' as Constants
|
import 'common/constants.js' as Constants
|
||||||
|
|
||||||
ButtonArea {
|
ButtonArea {
|
||||||
id: podcastItem
|
id: podcastItem
|
||||||
|
property bool isPlaying: ((player.episode == id) && player.isPlaying)
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -31,11 +32,24 @@ ButtonArea {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
|
|
||||||
width: parent.width * progress
|
width: parent.width * progress
|
||||||
color: Constants.colors.download
|
color: Constants.colors.download
|
||||||
opacity: .4
|
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
|
transparent: true
|
||||||
height: 80 * pgst.scalef
|
height: 80 * pgst.scalef
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue