On Load Animation (WIP)

This commit is contained in:
Dobin Park 2021-10-14 01:00:16 +09:00
parent 6d20db4c57
commit 4a37900d49
3 changed files with 19 additions and 4 deletions

View file

@ -63,7 +63,7 @@ namespace Flow.Launcher.Helper
mainViewModel.ToggleFlowLauncherOpacity();
var overlayTask = Task.Delay(30).ContinueWith(_ => {
mainViewModel.ToggleFlowLauncher();
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
});
e.Handled = true;
}
}
@ -81,7 +81,7 @@ namespace Flow.Launcher.Helper
switch(settings.LastQueryMode)
{
case LastQueryMode.Empty:
mainViewModel.ChangeQueryText("");
mainViewModel.ChangeQueryText(string.Empty);
break;
case LastQueryMode.Preserved:
mainViewModel.LastQuerySelected = true;

View file

@ -28,6 +28,22 @@
PreviewKeyDown="OnKeyDown"
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
d:DataContext="{d:DesignInstance vm:MainViewModel}">
<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.5">
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetProperty="Top" From="530" To="500" Duration="0:0:.5">
<DoubleAnimation.EasingFunction>
<QuarticEase EasingMode="EaseOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Window.Resources>
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter"/>
<converters:BorderClipConverter x:Key="BorderClipConverter"/>

View file

@ -14,7 +14,6 @@ using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Helper;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Storage;
using Flow.Launcher.Infrastructure.Logger;
@ -163,7 +162,7 @@ namespace Flow.Launcher.ViewModel
var overlayTask = Task.Delay(30).ContinueWith(_ => {
MainWindowVisibility = Visibility.Collapsed;
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
});
}