1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-10 07:25:37 -05:00

Fix media player positioning

fixes #235
This commit is contained in:
bbedward
2025-09-22 09:47:34 -04:00
parent 6a963ed618
commit 0a5f635a2d
3 changed files with 8 additions and 4 deletions

View File

@@ -17,7 +17,8 @@ Card {
readonly property real ratio: {
if (!activePlayer || activePlayer.length <= 0) return 0
const calculatedRatio = displayPosition / activePlayer.length
const pos = displayPosition % Math.max(1, activePlayer.length)
const calculatedRatio = pos / activePlayer.length
return Math.max(0, Math.min(1, calculatedRatio))
}