Skip to content

Commit ad186a3

Browse files
committed
On Load Animation (WIP)
1 parent 6d20db4 commit ad186a3

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

Flow.Launcher/Helper/HotKeyMapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ internal static void OnHotkey(object sender, HotkeyEventArgs e)
6363
mainViewModel.ToggleFlowLauncherOpacity();
6464
var overlayTask = Task.Delay(30).ContinueWith(_ => {
6565
mainViewModel.ToggleFlowLauncher();
66-
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
66+
});
6767
e.Handled = true;
6868
}
6969
}
@@ -81,7 +81,7 @@ private static void UpdateLastQUeryMode()
8181
switch(settings.LastQueryMode)
8282
{
8383
case LastQueryMode.Empty:
84-
mainViewModel.ChangeQueryText("");
84+
mainViewModel.ChangeQueryText(string.Empty);
8585
break;
8686
case LastQueryMode.Preserved:
8787
mainViewModel.LastQuerySelected = true;

Flow.Launcher/MainWindow.xaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@
2828
PreviewKeyDown="OnKeyDown"
2929
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
3030
d:DataContext="{d:DesignInstance vm:MainViewModel}">
31+
<Window.Triggers>
32+
<EventTrigger RoutedEvent="Window.Loaded">
33+
<BeginStoryboard>
34+
<Storyboard>
35+
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:.5">
36+
37+
</DoubleAnimation>
38+
<DoubleAnimation Storyboard.TargetProperty="Top" From="530" To="500" Duration="0:0:.5">
39+
<DoubleAnimation.EasingFunction>
40+
<QuarticEase EasingMode="EaseOut"/>
41+
</DoubleAnimation.EasingFunction>
42+
</DoubleAnimation>
43+
</Storyboard>
44+
</BeginStoryboard>
45+
</EventTrigger>
46+
</Window.Triggers>
3147
<Window.Resources>
3248
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter"/>
3349
<converters:BorderClipConverter x:Key="BorderClipConverter"/>

Flow.Launcher/SettingWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
<TextBlock Text="{Binding PluginPair.Metadata.Name}" TextWrapping="Wrap" ToolTip="{Binding PluginPair.Metadata.Version}" />
448448
<TextBlock Opacity="0.5" TextWrapping="Wrap" Margin="0 2 0 0">
449449
<Run Text="{Binding PluginPair.Metadata.Version}"/>
450-
</TextBlock>a
450+
</TextBlock>
451451
</StackPanel>
452452
</Grid>
453453
</DockPanel>

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using Flow.Launcher.Infrastructure.Storage;
1515
using Flow.Launcher.Infrastructure.UserSettings;
1616
using Flow.Launcher.Plugin;
17-
using Flow.Launcher.Helper;
1817
using Flow.Launcher.Plugin.SharedCommands;
1918
using Flow.Launcher.Storage;
2019
using Flow.Launcher.Infrastructure.Logger;
@@ -163,7 +162,7 @@ private void InitializeKeyCommands()
163162

164163
var overlayTask = Task.Delay(30).ContinueWith(_ => {
165164
MainWindowVisibility = Visibility.Collapsed;
166-
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
165+
});
167166

168167

169168
}

0 commit comments

Comments
 (0)