From 5ddd43958d3777e10371aa08bc0f421b2f5ab048 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 14 Feb 2022 13:51:02 +0100 Subject: [PATCH] HighlightWindowEffect: Use the duration parameter --- src/effects/highlightwindow/highlightwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/effects/highlightwindow/highlightwindow.cpp b/src/effects/highlightwindow/highlightwindow.cpp index 709be8f373..858695ffcb 100644 --- a/src/effects/highlightwindow/highlightwindow.cpp +++ b/src/effects/highlightwindow/highlightwindow.cpp @@ -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); } }