Make sure to disable pane entrance animation if user requests (#8237)

We were only checking app animations during pane _exit_.
This commit is contained in:
Don-Vito 2020-11-13 03:34:38 +02:00 committed by GitHub
parent 0437fe9d8e
commit e80108118d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1093,13 +1093,14 @@ void Pane::_SetupEntranceAnimation()
// Windows" setting in the OS
winrt::Windows::UI::ViewManagement::UISettings uiSettings;
const auto animationsEnabledInOS = uiSettings.AnimationsEnabled();
const auto animationsEnabledInApp = Media::Animation::Timeline::AllowDependentAnimations();
const bool splitWidth = _splitState == SplitState::Vertical;
const auto totalSize = splitWidth ? _root.ActualWidth() : _root.ActualHeight();
// If we don't have a size yet, it's likely that we're in startup, or we're
// being executed as a sequence of actions. In that case, just skip the
// animation.
if (totalSize <= 0 || !animationsEnabledInOS)
if (totalSize <= 0 || !animationsEnabledInOS || !animationsEnabledInApp)
{
return;
}