Gui: Add a separate checkbox for enabling spinning animations (#11534)

* Gui: Create group box for animation preferences

* Gui: Add spinning animation checkbox

* Gui: Implement isAnimating() for NavigationAnimator

* Gui: No need to enable animations in DemoMode

The spin animation is played regardless of the user preference and does not need to be enabled before starting the spin animation

* Gui: Change comment
This commit is contained in:
Bas Ruigrok
2023-12-04 17:50:29 +01:00
committed by GitHub
parent b70eb6a173
commit ea8b5b4b39
11 changed files with 226 additions and 151 deletions

View File

@@ -90,3 +90,15 @@ void NavigationAnimator::stop()
activeAnimation.reset();
}
}
/**
* @return Whether or not an animation is active
*/
bool NavigationAnimator::isAnimating() const
{
if (activeAnimation != nullptr) {
return activeAnimation->state() == QAbstractAnimation::State::Running;
}
return false;
}