Commit e5c6a321 authored by Bharadwaj Raju's avatar Bharadwaj Raju Committed by Nate Graham
Browse files

kdecoration: Use proper easing curves for shadow animations

Animating from invisible to visible should be OutCubic, and from visible to
invisible should be InCubic. https://develop.kde.org/hig/style/animations
parent 3d781d3d
Pipeline #131744 passed with stage
in 1 minute and 39 seconds
......@@ -226,7 +226,7 @@ namespace Breeze
m_shadowAnimation->setStartValue( 0.0 );
m_shadowAnimation->setEndValue( 1.0 );
m_shadowAnimation->setEasingCurve( QEasingCurve::InCubic );
m_shadowAnimation->setEasingCurve( QEasingCurve::OutCubic );
connect(m_shadowAnimation, &QVariantAnimation::valueChanged, this, [this](const QVariant& value) {
m_shadowOpacity = value.toReal();
updateShadow();
......@@ -305,6 +305,7 @@ namespace Breeze
const auto c = client().toStrongRef();
m_shadowAnimation->setDirection( c->isActive() ? QAbstractAnimation::Forward : QAbstractAnimation::Backward );
m_shadowAnimation->setEasingCurve( c->isActive() ? QEasingCurve::OutCubic : QEasingCurve::InCubic );
if( m_shadowAnimation->state() != QAbstractAnimation::Running ) m_shadowAnimation->start();
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment