1
0
Fork 0

[UI] I fail at maths.

This commit is contained in:
NamedKitten 2018-11-21 14:44:17 +00:00
parent 7dd808a93f
commit c5606041e1

View file

@ -120,8 +120,7 @@ Item {
progressBar.to = duration progressBar.to = duration
}) })
player.cachedDurationChanged.connect(function(duration) { player.cachedDurationChanged.connect(function(duration) {
cachedLength.width = ((progressBar.width / progressBar.to) cachedLength.width = progressBackground.width / progressBar.to * duration
* duration) - progressLength.width
}) })
} }
onMoved: { onMoved: {
@ -176,7 +175,7 @@ Item {
} }
Rectangle { Rectangle {
id: cachedLength id: cachedLength
z: 10 z: 100
radius: height radius: height
anchors.left: progressLength.right anchors.left: progressLength.right
anchors.leftMargin: 2 anchors.leftMargin: 2
@ -190,7 +189,6 @@ Item {
} }
handle: Rectangle { handle: Rectangle {
id: handleRect id: handleRect
x: progressBar.leftPadding + progressBar.visualPosition x: progressBar.leftPadding + progressBar.visualPosition
* (progressBar.availableWidth - width) * (progressBar.availableWidth - width)