on xenial help sign in
drop percentage calculation and use progress instead
commit853615a75b74df0a9cafd6ba4d292c80758887c3 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 22 Nov 2013, 12:21 (13 years ago) parent91c5d7f
1 file changed+2−2
Dash/Music/MusicPreview.qml+2−2
Dash/Music/MusicPreview.qml+2−2
@@ -57,7 +57,7 @@ GenericPreview {
5757 Audio {
5858 id: audioPlayer
5959 objectName: "audioPlayer"
60− property real percent: audioPlayer.position * 100 / audioPlayer.duration
60+ property real progress: audioPlayer.position / audioPlayer.duration
6161
6262 property Item playingItem
6363
@@ -163,7 +163,7 @@ GenericPreview {
163163 anchors.verticalCenter: progressBarImage.verticalCenter
164164 height: units.dp(2)
165165 anchors.margins: units.dp(2)
166− anchors.rightMargin: maxWidth - (maxWidth * audioPlayer.percent / 100) + units.dp(2)
166+ anchors.rightMargin: maxWidth - (maxWidth * audioPlayer.progress) + units.dp(2)
167167 visible: progressBarImage.visible
168168 property int maxWidth: progressBarImage.width - units.dp(4)
169169 }