HighlightWindowEffect: Use the duration parameter

This commit is contained in:
Albert Astals Cid 2022-02-14 13:51:02 +01:00
parent 4c0c2cebe6
commit 5ddd43958d

View file

@ -215,10 +215,10 @@ void HighlightWindowEffect::startGhostAnimation(EffectWindow *window, int durati
}
quint64 &animationId = m_animations[window];
if (animationId) {
retarget(animationId, FPx2(m_ghostOpacity, m_ghostOpacity), m_fadeDuration);
retarget(animationId, FPx2(m_ghostOpacity, m_ghostOpacity), duration);
} else {
const qreal startOpacity = isInitiallyHidden(window) ? 0 : 1;
animationId = set(window, Opacity, 0, m_fadeDuration, FPx2(m_ghostOpacity, m_ghostOpacity),
animationId = set(window, Opacity, 0, duration, FPx2(m_ghostOpacity, m_ghostOpacity),
m_easingCurve, 0, FPx2(startOpacity, startOpacity), false, false);
}
}
@ -230,10 +230,10 @@ void HighlightWindowEffect::startHighlightAnimation(EffectWindow *window, int du
}
quint64 &animationId = m_animations[window];
if (animationId) {
retarget(animationId, FPx2(1.0, 1.0), m_fadeDuration);
retarget(animationId, FPx2(1.0, 1.0), duration);
} else {
const qreal startOpacity = isInitiallyHidden(window) ? 0 : 1;
animationId = set(window, Opacity, 0, m_fadeDuration, FPx2(1.0, 1.0),
animationId = set(window, Opacity, 0, duration, FPx2(1.0, 1.0),
m_easingCurve, 0, FPx2(startOpacity, startOpacity), false, false);
}
}