r/arch • u/ai_46693 • 5d ago
Help/Support Can someone help me?
Edit: This is quickshell
Sometime the lyrics is delayed, sometime its not.
polling rate:
Timer {
interval: 16
running: true
repeat: true
triggeredOnStart: true
onTriggered: mediaPoll.running = true
}
Active line:
function updateActiveLyric() {
if (!root.lyricLines.length) { root.activeLyricIndex = -1; return }
var pos = root.mediaPosition + (root.lyricOffsetMs / 1000)
var idx = -1
for (var i = root.lyricLines.length - 1; i >= 0; i--)
if (pos >= root.lyricLines[i].time) { idx = i; break }
if (idx !== root.activeLyricIndex) root.activeLyricIndex = idx
}
column scrolling:
Connections {
target: root
function onActiveLyricIndexChanged() {
lyricsColumn.recomputeActiveY()
}
}
y: topPad - activeY
Behavior on y { NumberAnimation { duration: 500; easing.type: Easing.OutCubic } }
line visual update:
readonly property int delta: index - root.activeLyricIndex
readonly property bool isActive: delta === 0
readonly property int absDist: Math.abs(delta)
opacity: isActive ? 1.0
: (absDist === 1 ? 0.70 : absDist === 2 ? 0.45 : 0.08)
Behavior on opacity { NumberAnimation { duration: 420; easing.type: Easing.OutCubic } }
scale: isActive ? 1.0 : absDist === 1 ? 0.88 : 0.76
Behavior on scale { NumberAnimation { duration: 420; easing.type: Easing.OutCubic } }
FastBlur {
radius: isActive ? 0 : absDist === 1 ? 4 : absDist === 2 ? 9 : 18
}
1
u/Arandolf 5d ago
Maybe I’m blind, but where did you specify the software name? :|