Skip to content

Commit 4731d88

Browse files
committed
Removed window animation storyboard
1 parent a3322fc commit 4731d88

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,6 @@ private void WindowAnimation()
749749
ClockPanel.Opacity = 0;
750750
SearchIcon.Opacity = 0;
751751

752-
var windowsb = new Storyboard();
753752
var clocksb = new Storyboard();
754753
var iconsb = new Storyboard();
755754
CircleEase easing = new CircleEase { EasingMode = EasingMode.EaseInOut };
@@ -762,22 +761,6 @@ private void WindowAnimation()
762761
_ => _settings.CustomAnimationLength
763762
};
764763

765-
var WindowOpacity = new DoubleAnimation
766-
{
767-
From = 1,
768-
To = 1,
769-
Duration = TimeSpan.FromMilliseconds(animationLength * 2 / 3),
770-
FillBehavior = FillBehavior.HoldEnd
771-
};
772-
773-
var WindowMotion = new DoubleAnimation
774-
{
775-
From = Top,
776-
To = Top,
777-
Duration = TimeSpan.FromMilliseconds(animationLength * 2 / 3),
778-
FillBehavior = FillBehavior.HoldEnd
779-
};
780-
781764
var IconMotion = new DoubleAnimation
782765
{
783766
From = 12,
@@ -824,12 +807,6 @@ private void WindowAnimation()
824807
Storyboard.SetTargetName(thicknessAnimation, "ClockPanel");
825808
Storyboard.SetTargetProperty(thicknessAnimation, new PropertyPath(MarginProperty));
826809

827-
Storyboard.SetTarget(WindowOpacity, this);
828-
Storyboard.SetTargetProperty(WindowOpacity, new PropertyPath(OpacityProperty));
829-
830-
Storyboard.SetTarget(WindowMotion, this);
831-
Storyboard.SetTargetProperty(WindowMotion, new PropertyPath(TopProperty));
832-
833810
Storyboard.SetTarget(IconMotion, SearchIcon);
834811
Storyboard.SetTargetProperty(IconMotion, new PropertyPath(TopProperty));
835812

@@ -838,12 +815,10 @@ private void WindowAnimation()
838815

839816
clocksb.Children.Add(thicknessAnimation);
840817
clocksb.Children.Add(ClockOpacity);
841-
windowsb.Children.Add(WindowOpacity);
842-
windowsb.Children.Add(WindowMotion);
843818
iconsb.Children.Add(IconMotion);
844819
iconsb.Children.Add(IconOpacity);
845820

846-
windowsb.Completed += (_, _) => _animating = false;
821+
clocksb.Completed += (_, _) => _animating = false;
847822
_settings.WindowLeft = Left;
848823
isArrowKeyPressed = false;
849824

@@ -853,7 +828,6 @@ private void WindowAnimation()
853828
}
854829

855830
iconsb.Begin(SearchIcon);
856-
windowsb.Begin(this);
857831
}
858832

859833
private void UpdateClockPanelVisibility()

0 commit comments

Comments
 (0)