From 0a41072f33a7196402db93e2266a8f9d52ca2b13 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 22 Apr 2025 11:21:11 +0900 Subject: [PATCH 1/4] Add animation option when showing the main window --- Flow.Launcher/MainWindow.xaml.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index bf7a45b1d25..ee84dfeb46c 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -138,8 +138,12 @@ private async void OnLoaded(object sender, RoutedEventArgs _) else { _viewModel.Show(); + if (_settings.UseAnimation) + { + WindowAnimation(); + } } - + // Show notify icon when flowlauncher is hidden InitializeNotifyIcon(); From 267b6d2c10a988b48af60b0f8cb9acdb315546b7 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 25 Apr 2025 16:28:29 +0800 Subject: [PATCH 2/4] Improve code quality --- Flow.Launcher/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 5b5aa64fdbf..f7e7173e1bc 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -889,10 +889,10 @@ private void WindowAnimation() FillBehavior = FillBehavior.HoldEnd }; - Storyboard.SetTargetProperty(ClockOpacity, new PropertyPath(OpacityProperty)); Storyboard.SetTarget(ClockOpacity, ClockPanel); + Storyboard.SetTargetProperty(ClockOpacity, new PropertyPath(OpacityProperty)); - Storyboard.SetTargetName(thicknessAnimation, "ClockPanel"); + Storyboard.SetTarget(thicknessAnimation, ClockPanel); Storyboard.SetTargetProperty(thicknessAnimation, new PropertyPath(MarginProperty)); Storyboard.SetTarget(IconMotion, SearchIcon); From 4f39c0a340cef85e63c8af623e578d3118ea2279 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 25 Apr 2025 16:32:23 +0800 Subject: [PATCH 3/4] Add code comments --- Flow.Launcher/MainWindow.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index f7e7173e1bc..493c9699b7f 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -138,6 +138,9 @@ private async void OnLoaded(object sender, RoutedEventArgs _) else { _viewModel.Show(); + // When HideOnStartup is off and UseAnimation is on, + // there was a bug where the clock would not appear at all on the initial launch + // So we need to forcibly trigger animation here to ensure the clock visible if (_settings.UseAnimation) { WindowAnimation(); From e3dbdaef15b9a53bca6cce994cb2f5e01ddceed3 Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Fri, 25 Apr 2025 16:34:32 +0800 Subject: [PATCH 4/4] Fix typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Flow.Launcher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 493c9699b7f..10aff050ee8 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -140,7 +140,7 @@ private async void OnLoaded(object sender, RoutedEventArgs _) _viewModel.Show(); // When HideOnStartup is off and UseAnimation is on, // there was a bug where the clock would not appear at all on the initial launch - // So we need to forcibly trigger animation here to ensure the clock visible + // So we need to forcibly trigger animation here to ensure the clock is visible if (_settings.UseAnimation) { WindowAnimation();