Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
342bf30
- Add Slide Up Animation
onesounds Nov 11, 2021
a4e941b
Change Property toggle base to Var from visibility
onesounds Nov 11, 2021
5a969b2
Add InitPosition in WindowAnimator
onesounds Nov 12, 2021
f1222f9
Fix Positioning when turn on remember last launch position
onesounds Nov 12, 2021
6d8ee64
- Change trigger animation Timing
onesounds Nov 12, 2021
037c343
- Change InitializePosition for load setting
onesounds Nov 13, 2021
4a86962
- Fix RememberLastPosition when Re-Excute
onesounds Nov 13, 2021
6744e21
Remove some unused code
taooceros Nov 13, 2021
ca2d696
Remove redundant animation and potential position change
taooceros Nov 13, 2021
62eb1b6
- Add Sound
onesounds Nov 13, 2021
15266f2
- Add time for hide when open setting (using context menu)
onesounds Nov 14, 2021
42f1b57
- Change Setting Window Size to responsive
onesounds Nov 14, 2021
838d6c5
Remove Left Positioning Code in animation
onesounds Nov 14, 2021
e04944f
Merge Dev
onesounds Nov 14, 2021
b17f12b
change wav file to resource
onesounds Nov 14, 2021
37858a4
Change Sound FIle
onesounds Nov 14, 2021
5a430bf
Change Wav to output
onesounds Nov 14, 2021
abe4eec
fix Wav output setting
onesounds Nov 14, 2021
f8cfa7c
Remove Resize Settting window code (It made weired blink when open se…
onesounds Nov 14, 2021
a2600af
- Add Show() function and seperate toggleflow()
onesounds Nov 14, 2021
add99c4
- Change MainwindowVisibility to using show()
onesounds Nov 14, 2021
e8e1393
Change UseSound to Default.
onesounds Nov 15, 2021
7107386
- Fix First Launch Position to Center
onesounds Nov 16, 2021
0cb3d05
Merge branch 'dev' into RealFinalAnimation
onesounds Nov 16, 2021
a301d8e
Adjust Position Update Timing
onesounds Nov 18, 2021
eaf0649
Add Delay to Opacity when Main Window Deactive
onesounds Nov 19, 2021
4525043
Change Icon uniform property from uniformtofill (Fix wide icon cut)
onesounds Nov 19, 2021
e500b35
Apply suggestions from code review
onesounds Nov 19, 2021
7a0ef5c
Update Flow.Launcher/Languages/en.xaml
onesounds Nov 19, 2021
8f1a9bf
Remove Save in OnDeactivated
onesounds Nov 19, 2021
23ba5e9
Merge branch 'dev' into RealFinalAnimation
jjw24 Nov 20, 2021
3c78802
- move sound play code to animator from show
onesounds Nov 20, 2021
89677ff
Merge branch 'RealFinalAnimation' of https://github.com/onesounds/Flo…
onesounds Nov 20, 2021
3eeac91
Add Animation in Glass Icon
onesounds Nov 20, 2021
e30af37
Adjust Delay Duration to fix blink
onesounds Nov 22, 2021
e282fc5
- Remove visible/collapsed code (only using opacity)
onesounds Nov 22, 2021
4df1e41
Revert "- Remove visible/collapsed code (only using opacity)"
onesounds Nov 22, 2021
df4f94f
Adjust Delay for ondeactivated
onesounds Nov 22, 2021
7b4867d
prevent re-triggering on deactivated
jjw24 Nov 23, 2021
49b3a02
Adjust Animation Time
onesounds Nov 26, 2021
c94a04b
refinements to delay and show hide toggle
jjw24 Nov 27, 2021
091b4af
switch to use main window's Show method
jjw24 Nov 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public CustomExplorerViewModel CustomExplorer
}
};

public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;

/// <summary>
/// when false Alphabet static service will always return empty results
Expand Down
2 changes: 0 additions & 2 deletions Flow.Launcher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
AutoUpdates();

API.SaveAppAllSettings();

_mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible;
Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- ");
});
}
Expand Down
137 changes: 103 additions & 34 deletions Flow.Launcher/CustomQueryHotkeySetting.xaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,126 @@
<Window x:Class="Flow.Launcher.CustomQueryHotkeySetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
Icon="Images\app.png"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
MouseDown="window_MouseDown"
Title="{DynamicResource customeQueryHotkeyTitle}" Height="345" Width="500" Background="#F3F3F3" BorderBrush="#cecece">
<Window
x:Class="Flow.Launcher.CustomQueryHotkeySetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
Title="{DynamicResource customeQueryHotkeyTitle}"
Width="500"
Height="345"
Background="#F3F3F3"
BorderBrush="#cecece"
Icon="Images\app.png"
MouseDown="window_MouseDown"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen">
<Window.InputBindings>
<KeyBinding Key="Escape" Command="Close"/>
<KeyBinding Key="Escape" Command="Close" />
</Window.InputBindings>
<Window.CommandBindings>
<CommandBinding Command="Close" Executed="cmdEsc_OnPress"/>
<CommandBinding Command="Close" Executed="cmdEsc_OnPress" />
</Window.CommandBindings>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="80"/>
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
<Border
Padding="26,26,26,0"
Background="#ffffff"
BorderBrush="#e5e5e5"
BorderThickness="0,0,0,1">
<Grid>
<StackPanel>
<StackPanel Grid.Row="0" Margin="0 0 0 12">
<TextBlock Grid.Column="0" Text="{DynamicResource customeQueryHotkeyTitle}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
Margin="0 0 0 0" />
<StackPanel Grid.Row="0" Margin="0,0,0,12">
<TextBlock
Grid.Column="0"
Margin="0,0,0,0"
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource customeQueryHotkeyTitle}"
TextAlignment="Left" />
</StackPanel>
<StackPanel>
<TextBlock
Text="{DynamicResource customeQueryHotkeyTips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
<TextBlock
FontSize="14"
Foreground="#1b1b1b"
Text="{DynamicResource customeQueryHotkeyTips}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
</StackPanel>

<StackPanel Orientation="Horizontal" Margin="0 20 0 0">
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"
HorizontalAlignment="Left" Text="{DynamicResource hotkey}" Width="60"/>
<flowlauncher:HotkeyControl x:Name="ctlHotkey" Margin="10,0,10,0" Grid.Column="1" VerticalAlignment="Center" Height="32" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="200"/>
<TextBlock Margin="10" FontSize="14" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
HorizontalAlignment="Left" Text="{DynamicResource actionKeyword}" />
<StackPanel Margin="0,20,0,0" Orientation="Horizontal">
<TextBlock
Grid.Row="0"
Grid.Column="0"
Width="60"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource hotkey}" />
<flowlauncher:HotkeyControl
x:Name="ctlHotkey"
Grid.Column="1"
Width="200"
Height="32"
Margin="10,0,10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
HorizontalContentAlignment="Left" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource actionKeyword}" />
</StackPanel>

<StackPanel Orientation="Horizontal" Margin="0 0 0 0">
<TextBlock Margin="10" FontSize="14" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Width="60"
HorizontalAlignment="Left" Text="{DynamicResource customQuery}" />
<TextBox x:Name="tbAction" Margin="10" Width="250" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button x:Name="btnTestActionKeyword" Padding="10 5 10 5" Height="30" Click="BtnTestActionKeyword_OnClick"
Content="{DynamicResource preview}" />
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
<TextBlock
Grid.Row="0"
Grid.Column="0"
Width="60"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource customQuery}" />
<TextBox
x:Name="tbAction"
Width="250"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
<Button
x:Name="btnTestActionKeyword"
Height="30"
Padding="10,5,10,5"
Click="BtnTestActionKeyword_OnClick"
Content="{DynamicResource preview}" />
</StackPanel>
</StackPanel>
</Grid>
</Border>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="10 0 5 0" Width="100" Height="32"
Content="{DynamicResource cancel}" />
<Button x:Name="btnAdd" Margin="5 0 10 0" Width="100" Height="32" Click="btnAdd_OnClick">
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnCancel"
Width="100"
Height="32"
Margin="10,0,5,0"
Click="BtnCancel_OnClick"
Content="{DynamicResource cancel}" />
<Button
x:Name="btnAdd"
Width="100"
Height="32"
Margin="5,0,10,0"
Click="btnAdd_OnClick">
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
</Button>
</StackPanel>
Expand Down
1 change: 1 addition & 0 deletions Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e)
{
App.API.ChangeQuery(tbAction.Text);
Application.Current.MainWindow.Visibility = Visibility.Visible;
Application.Current.MainWindow.Opacity = 1;
Application.Current.MainWindow.Focus();

}
Expand Down
6 changes: 6 additions & 0 deletions Flow.Launcher/Flow.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@
<ProjectReference Include="..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="Resources\open.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="taskkill /f /fi &quot;IMAGENAME eq Flow.Launcher.exe&quot;" />
</Target>
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/Helper/HotKeyMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ internal static void SetCustomQueryHotkey(CustomPluginHotkey hotkey)
if (mainViewModel.ShouldIgnoreHotkeys())
return;

mainViewModel.MainWindowVisibility = Visibility.Visible;
mainViewModel.Show();
mainViewModel.ChangeQueryText(hotkey.ActionKeyword, true);
});
}
Expand Down
1 change: 0 additions & 1 deletion Flow.Launcher/Helper/SingletonWindowOpener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public static T Open<T>(params object[] args) where T : Window
{
var window = Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.GetType() == typeof(T))
?? (T)Activator.CreateInstance(typeof(T), args);
Application.Current.MainWindow.Hide();

// Fix UI bug
// Add `window.WindowState = WindowState.Normal`
Expand Down
4 changes: 4 additions & 0 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
<system:String x:Key="theme_load_failure_parse_error">Fail to load theme {0}, fallback to default theme</system:String>
<system:String x:Key="ThemeFolder">Theme Folder</system:String>
<system:String x:Key="OpenThemeFolder">Open Theme Folder</system:String>
<system:String x:Key="SoundEffect">Sound Effect</system:String>
<system:String x:Key="SoundEffectTip">Play a small sound when the search window opens</system:String>
<system:String x:Key="Animation">Animation</system:String>
<system:String x:Key="AnimationTip">Use Animation in UI</system:String>

<!-- Setting Hotkey -->
<system:String x:Key="hotkey">Hotkey</system:String>
Expand Down
Loading