Skip to content

Commit

Permalink
Make sure to disable pane entrance animation if user requests (#8237)
Browse files Browse the repository at this point in the history
We were only checking app animations during pane _exit_.
  • Loading branch information
Don-Vito authored Nov 13, 2020
1 parent 0437fe9 commit e801081
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascadia/TerminalApp/Pane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e801081

Please sign in to comment.