mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 05:55:37 -05:00
make text scroll speed relative to text length
This commit is contained in:
@@ -161,7 +161,7 @@ Rectangle {
|
|||||||
property: "scrollOffset"
|
property: "scrollOffset"
|
||||||
from: 0
|
from: 0
|
||||||
to: mediaText.implicitWidth - textContainer.width + 5
|
to: mediaText.implicitWidth - textContainer.width + 5
|
||||||
duration: 5000
|
duration: Math.max(1000, (mediaText.implicitWidth - textContainer.width + 5) * 60)
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ Rectangle {
|
|||||||
target: mediaText
|
target: mediaText
|
||||||
property: "scrollOffset"
|
property: "scrollOffset"
|
||||||
to: 0
|
to: 0
|
||||||
duration: 5000
|
duration: Math.max(1000, (mediaText.implicitWidth - textContainer.width + 5) * 60)
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user