From 9ff71bc25a4ef5ce3cb0bdeb776455fccc2ad6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Thu, 28 Jul 2022 02:07:02 -0300 Subject: [PATCH] Fixed and old and minor bug with CSS animations and properties. --- src/eepp/ui/css/stylesheetpropertyanimation.cpp | 2 ++ src/eepp/ui/uistyle.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/eepp/ui/css/stylesheetpropertyanimation.cpp b/src/eepp/ui/css/stylesheetpropertyanimation.cpp index 8d42d377a..3a050b6da 100644 --- a/src/eepp/ui/css/stylesheetpropertyanimation.cpp +++ b/src/eepp/ui/css/stylesheetpropertyanimation.cpp @@ -422,6 +422,8 @@ void StyleSheetPropertyAnimation::setRunning( const bool& running ) { void StyleSheetPropertyAnimation::setPaused( const bool& paused ) { mPaused = paused; + if ( !mPaused ) + onUpdate( Time::Zero ); } void StyleSheetPropertyAnimation::notifyClose() { diff --git a/src/eepp/ui/uistyle.cpp b/src/eepp/ui/uistyle.cpp index ec720e5ca..ffd42c3d3 100644 --- a/src/eepp/ui/uistyle.cpp +++ b/src/eepp/ui/uistyle.cpp @@ -265,8 +265,6 @@ void UIStyle::onStateChange() { mWidget->beginAttributesTransaction(); - updateAnimations(); - if ( nullptr != mDefinition && !mDefinition->getTransitionProperties().empty() ) { mTransitions = TransitionDefinition::parseTransitionProperties( mDefinition->getTransitionProperties() ); @@ -291,6 +289,8 @@ void UIStyle::onStateChange() { } } + updateAnimations(); + mWidget->endAttributesTransaction(); }