Skip to content

Commit

Permalink
Improve Windows 10 opening animation
Browse files Browse the repository at this point in the history
  • Loading branch information
stnkl committed Jan 26, 2023
1 parent 0c8899a commit 446c961
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions EverythingToolbar/SearchWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</Border.Effect>
<Border x:Name="PopupBorder"
BorderThickness="1"
BorderBrush="{DynamicResource SearchResultsViewBorder}"
Background="{DynamicResource SearchResultsViewHeader}">

<Grid Name="ContentGrid">
Expand Down
6 changes: 5 additions & 1 deletion EverythingToolbar/SearchWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,24 +140,28 @@ private void AnimateShowWin10(double left, double top, double width, double heig
Thickness contentGridOffset;
if (taskbarEdge == Edge.Top)
{
Top -= DropShadowBlurRadius;
Left -= DropShadowBlurRadius;
contentGridOffset = new Thickness(0, -50, 0, 50);
PopupMarginBorder.Margin = new Thickness(DropShadowBlurRadius, 0, DropShadowBlurRadius, DropShadowBlurRadius);
}
else if (taskbarEdge == Edge.Right)
{
Top -= DropShadowBlurRadius;
Left += DropShadowBlurRadius;
contentGridOffset = new Thickness(50, 0, -50, 0);
PopupMarginBorder.Margin = new Thickness(DropShadowBlurRadius, DropShadowBlurRadius, 0, DropShadowBlurRadius);
}
else if (taskbarEdge == Edge.Left)
{
Top -= DropShadowBlurRadius;
Left -= DropShadowBlurRadius;
contentGridOffset = new Thickness(-50, 0, 50, 0);
PopupMarginBorder.Margin = new Thickness(0, DropShadowBlurRadius, DropShadowBlurRadius, DropShadowBlurRadius);
}
else
{
Top += DropShadowBlurRadius;
Left -= DropShadowBlurRadius;
contentGridOffset = new Thickness(0, 50, 0, -50);
PopupMarginBorder.Margin = new Thickness(DropShadowBlurRadius, DropShadowBlurRadius, DropShadowBlurRadius, 0);
Expand Down Expand Up @@ -236,8 +240,8 @@ private void AnimateHideWin10(Edge taskbarEdge)
break;
}
DoubleAnimation animation = new DoubleAnimation(target, TimeSpan.Zero);
animation.Completed += OnHidden;
BeginAnimation(property, animation);
base.Hide();
}

private void AnimateHideWin11(Edge taskbarEdge)
Expand Down
2 changes: 1 addition & 1 deletion EverythingToolbar/Themes/Win11/DARK.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<SolidColorBrush x:Key="QuickSettingsToggleButtonBorderActive" Color="Transparent" />

<SolidColorBrush x:Key="SearchResultsViewBackground" Color="Transparent" />
<SolidColorBrush x:Key="SearchResultsViewBorder" Color="#7f5f5f5f" />
<SolidColorBrush x:Key="SearchResultsViewBorder" Color="Transparent" />
<SolidColorBrush x:Key="SearchResultsViewHeader" Color="#b9151515" />

<SolidColorBrush x:Key="TabBackground" Color="#11ffffff" />
Expand Down
2 changes: 1 addition & 1 deletion EverythingToolbar/Themes/Win11/LIGHT.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<SolidColorBrush x:Key="QuickSettingsToggleButtonBorderActive" Color="Transparent" />

<SolidColorBrush x:Key="SearchResultsViewBackground" Color="Transparent" />
<SolidColorBrush x:Key="SearchResultsViewBorder" Color="#7f5f5f5f" />
<SolidColorBrush x:Key="SearchResultsViewBorder" Color="Transparent" />
<SolidColorBrush x:Key="SearchResultsViewHeader" Color="#ddffffff" />

<SolidColorBrush x:Key="TabBackground" Color="#ccfbfbfb" />
Expand Down

0 comments on commit 446c961

Please sign in to comment.