plugins/shakecursor: Ignore animation speed

From the user perspective, shaking cursor is not perceived as an
animation, so let's ignore the global animation speed factor.

BUG: 488813
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 2db79aaca8
commit 9276d28b3d
  1. 6
      src/plugins/shakecursor/shakecursor.cpp

@ -13,8 +13,6 @@
#include "scene/cursoritem.h"
#include "scene/workspacescene.h"
using namespace std::chrono_literals;
namespace KWin
{
@ -84,7 +82,7 @@ void ShakeCursorEffect::animateTo(qreal magnification)
m_scaleAnimation.setStartValue(m_currentMagnification);
m_scaleAnimation.setEndValue(magnification);
m_scaleAnimation.setDuration(animationTime(200ms));
m_scaleAnimation.setDuration(200); // ignore animation speed, it's not an animation from user perspective
m_scaleAnimation.setEasingCurve(QEasingCurve::InOutCubic);
m_scaleAnimation.start();
@ -105,7 +103,7 @@ void ShakeCursorEffect::pointerEvent(MouseEvent *event)
if (m_shakeDetector.update(event)) {
inflate();
m_deflateTimer.start(animationTime(2000ms));
m_deflateTimer.start(2000);
}
}

Loading…
Cancel
Save