Show download status in episode list
This commit is contained in:
parent
90b4f04e35
commit
24f686fad6
3 changed files with 27 additions and 1 deletions
|
@ -47,7 +47,7 @@ ButtonArea {
|
|||
PLabel {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
right: downloadStatusIcon.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
margins: 30 * pgst.scalef
|
||||
}
|
||||
|
@ -55,5 +55,23 @@ ButtonArea {
|
|||
elide: Text.ElideRight
|
||||
text: title
|
||||
}
|
||||
|
||||
Image {
|
||||
id: downloadStatusIcon
|
||||
|
||||
anchors {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
margins: 30 * pgst.scalef
|
||||
}
|
||||
|
||||
source: {
|
||||
switch (downloadState) {
|
||||
case Constants.state.normal: return '';
|
||||
case Constants.state.downloaded: return 'images/play.png';
|
||||
case Constants.state.deleted: return 'images/delete.png';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,3 +31,9 @@ var colors = {
|
|||
playback: '#729fcf', /* playback blue */
|
||||
};
|
||||
|
||||
var state = {
|
||||
normal: 0,
|
||||
downloaded: 1,
|
||||
deleted: 2,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue