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:
parent
0437fe9d8e
commit
e80108118d
|
@ -1093,13 +1093,14 @@ void Pane::_SetupEntranceAnimation()
|
||||||
// Windows" setting in the OS
|
// Windows" setting in the OS
|
||||||
winrt::Windows::UI::ViewManagement::UISettings uiSettings;
|
winrt::Windows::UI::ViewManagement::UISettings uiSettings;
|
||||||
const auto animationsEnabledInOS = uiSettings.AnimationsEnabled();
|
const auto animationsEnabledInOS = uiSettings.AnimationsEnabled();
|
||||||
|
const auto animationsEnabledInApp = Media::Animation::Timeline::AllowDependentAnimations();
|
||||||
|
|
||||||
const bool splitWidth = _splitState == SplitState::Vertical;
|
const bool splitWidth = _splitState == SplitState::Vertical;
|
||||||
const auto totalSize = splitWidth ? _root.ActualWidth() : _root.ActualHeight();
|
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
|
// 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
|
// being executed as a sequence of actions. In that case, just skip the
|
||||||
// animation.
|
// animation.
|
||||||
if (totalSize <= 0 || !animationsEnabledInOS)
|
if (totalSize <= 0 || !animationsEnabledInOS || !animationsEnabledInApp)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue