Skip to content

Commit

Permalink
微小的优化
Browse files Browse the repository at this point in the history
  • Loading branch information
clover-yan committed May 17, 2023
1 parent f9880e8 commit 6e3effb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DateCountdown/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ private void DispatcherTimer_Tick(object sender, EventArgs e)
}
if (isFullScreen) {
if (IsForegroundFullScreen() || IsMaximized()) {
if ((transState += 0.02) > 3)
transState = -3;
if ((transState += 0.02) > 2.4)
transState = -2.4;
Foreground = new SolidColorBrush(light ? Colors.White : Colors.Black) { Opacity = (Math.Cos(transState) + 1.0) / (alpha ? 4.0 : 2.0) };
TextBlockDays.Foreground = new SolidColorBrush(((SolidColorBrush)TextBlockDays.Foreground).Color) { Opacity = (Math.Cos(transState) + 1.0) / (alpha ? 4.0 : 2.0) };
} else {
Expand Down Expand Up @@ -167,7 +167,7 @@ private void Grid_MouseMove(object sender, System.Windows.Input.MouseEventArgs e

private void Window_Loaded(object sender, RoutedEventArgs e)
{
Top = 30;
Top = 32;
Left = 0;
Width = SystemParameters.WorkArea.Width;

Expand Down Expand Up @@ -243,8 +243,8 @@ private void Window_Loaded(object sender, RoutedEventArgs e)

if (App.StartArgs.Contains("-b"))
{
TextBlockTitle.Effect = AfterText.Effect = TextBlockCopyright.Effect = new DropShadowEffect { Color = light ? Colors.Black : Colors.White, Direction = 320, ShadowDepth = 0, BlurRadius = 5 };
TextBlockDays.Effect = TextBlockDaysDetails.Effect = new DropShadowEffect { Color = light ? Colors.White : Colors.Black, Direction = 320, ShadowDepth = 0, BlurRadius = 5 };
TextBlockTitle.Effect = AfterText.Effect = TextBlockCopyright.Effect = new DropShadowEffect { Color = light ? Colors.Black : Colors.White, Direction = 320, ShadowDepth = 0, BlurRadius = 5, Opacity = alpha ? 0.5 : 1.0 };
TextBlockDays.Effect = TextBlockDaysDetails.Effect = new DropShadowEffect { Color = light ? Colors.White : Colors.Black, Direction = 320, ShadowDepth = 0, BlurRadius = 5, Opacity = alpha ? 0.5 : 1.0 };
}

if (App.StartArgs.Contains("-p"))
Expand Down

0 comments on commit 6e3effb

Please sign in to comment.