Skip to content

Commit 95d82b3

Browse files
authored
Merge pull request #3482 from onesounds/250422-FixClockwhenStartUp
Fix clock not displaying in certain situations
2 parents 25ae2da + e3dbdae commit 95d82b3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ private async void OnLoaded(object sender, RoutedEventArgs _)
138138
else
139139
{
140140
_viewModel.Show();
141+
// When HideOnStartup is off and UseAnimation is on,
142+
// there was a bug where the clock would not appear at all on the initial launch
143+
// So we need to forcibly trigger animation here to ensure the clock is visible
144+
if (_settings.UseAnimation)
145+
{
146+
WindowAnimation();
147+
}
141148
}
142149

143150
// Initialize context menu & notify icon
@@ -885,10 +892,10 @@ private void WindowAnimation()
885892
FillBehavior = FillBehavior.HoldEnd
886893
};
887894

888-
Storyboard.SetTargetProperty(ClockOpacity, new PropertyPath(OpacityProperty));
889895
Storyboard.SetTarget(ClockOpacity, ClockPanel);
896+
Storyboard.SetTargetProperty(ClockOpacity, new PropertyPath(OpacityProperty));
890897

891-
Storyboard.SetTargetName(thicknessAnimation, "ClockPanel");
898+
Storyboard.SetTarget(thicknessAnimation, ClockPanel);
892899
Storyboard.SetTargetProperty(thicknessAnimation, new PropertyPath(MarginProperty));
893900

894901
Storyboard.SetTarget(IconMotion, SearchIcon);

0 commit comments

Comments
 (0)