Skip to content

Commit 15266f2

Browse files
committed
- Add time for hide when open setting (using context menu)
- Adjust String
1 parent 62eb1b6 commit 15266f2

File tree

2 files changed

+33
-28
lines changed

2 files changed

+33
-28
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:system="clr-namespace:System;assembly=mscorlib">
4-
<!--MainWindow-->
1+
<ResourceDictionary
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:system="clr-namespace:System;assembly=mscorlib">
5+
<!-- MainWindow -->
56
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey: {0}</system:String>
67
<system:String x:Key="couldnotStartCmd">Could not start {0}</system:String>
78
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Invalid Flow Launcher plugin file format</system:String>
@@ -15,7 +16,7 @@
1516
<system:String x:Key="iconTrayExit">Exit</system:String>
1617
<system:String x:Key="closeWindow">Close</system:String>
1718

18-
<!--Setting General-->
19+
<!-- Setting General -->
1920
<system:String x:Key="flowlauncher_settings">Flow Launcher Settings</system:String>
2021
<system:String x:Key="general">General</system:String>
2122
<system:String x:Key="portableMode">Portable Mode</system:String>
@@ -44,7 +45,7 @@
4445
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese</system:String>
4546
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
4647

47-
<!--Setting Plugin-->
48+
<!-- Setting Plugin -->
4849
<system:String x:Key="plugin">Plugins</system:String>
4950
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
5051
<system:String x:Key="enable">On</system:String>
@@ -62,12 +63,12 @@
6263
<system:String x:Key="plugin_query_time">Query time:</system:String>
6364

6465

65-
<!--Setting Plugin Store-->
66+
<!-- Setting Plugin Store -->
6667
<system:String x:Key="pluginStore">Plugin Store</system:String>
6768
<system:String x:Key="refresh">Refresh</system:String>
6869
<system:String x:Key="install">Install</system:String>
6970

70-
<!--Setting Theme-->
71+
<!-- Setting Theme -->
7172
<system:String x:Key="theme">Theme</system:String>
7273
<system:String x:Key="browserMoreThemes">Theme Gallery</system:String>
7374
<system:String x:Key="howToCreateTheme">How to create a theme</system:String>
@@ -81,11 +82,11 @@
8182
<system:String x:Key="ThemeFolder">Theme Folder</system:String>
8283
<system:String x:Key="OpenThemeFolder">Open Theme Folder</system:String>
8384
<system:String x:Key="SoundEffect">Sound Effect</system:String>
84-
<system:String x:Key="SoundEffectTip">Play a small sound when window open.</system:String>
85+
<system:String x:Key="SoundEffectTip">Play a small sound when window open</system:String>
8586
<system:String x:Key="Animation">Animation</system:String>
86-
<system:String x:Key="AnimationTip">Use Animation in UI.</system:String>
87+
<system:String x:Key="AnimationTip">Use Animation in UI</system:String>
8788

88-
<!--Setting Hotkey-->
89+
<!-- Setting Hotkey -->
8990
<system:String x:Key="hotkey">Hotkey</system:String>
9091
<system:String x:Key="flowlauncherHotkey">Flow Launcher Hotkey</system:String>
9192
<system:String x:Key="flowlauncherHotkeyToolTip">Enter shortcut to show/hide Flow Launcher.</system:String>
@@ -106,7 +107,7 @@
106107
<system:String x:Key="useGlyphUI">Use Segoe Fluent Icons</system:String>
107108
<system:String x:Key="useGlyphUIEffect">Use Segoe Fluent Icons for query results where supported</system:String>
108109

109-
<!--Setting Proxy-->
110+
<!-- Setting Proxy -->
110111
<system:String x:Key="proxy">HTTP Proxy</system:String>
111112
<system:String x:Key="enableProxy">Enable HTTP Proxy</system:String>
112113
<system:String x:Key="server">HTTP Server</system:String>
@@ -122,7 +123,7 @@
122123
<system:String x:Key="proxyIsCorrect">Proxy configured correctly</system:String>
123124
<system:String x:Key="proxyConnectFailed">Proxy connection failed</system:String>
124125

125-
<!--Setting About-->
126+
<!-- Setting About -->
126127
<system:String x:Key="about">About</system:String>
127128
<system:String x:Key="website">Website</system:String>
128129
<system:String x:Key="version">Version</system:String>
@@ -131,18 +132,18 @@
131132
<system:String x:Key="newVersionTips">New version {0} is available, would you like to restart Flow Launcher to use the update?</system:String>
132133
<system:String x:Key="checkUpdatesFailed">Check updates failed, please check your connection and proxy settings to api.github.com.</system:String>
133134
<system:String x:Key="downloadUpdatesFailed">
134-
Download updates failed, please check your connection and proxy settings to github-cloud.s3.amazonaws.com,
135+
Download updates failed, please check your connection and proxy settings to github-cloud.s3.amazonaws.com,
135136
or go to https://github.com/Flow-Launcher/Flow.Launcher/releases to download updates manually.
136137
</system:String>
137138
<system:String x:Key="releaseNotes">Release Notes</system:String>
138139
<system:String x:Key="documentation">Usage Tips:</system:String>
139140

140-
<!--Priority Setting Dialog-->
141+
<!-- Priority Setting Dialog -->
141142
<system:String x:Key="changePriorityWindow">Change Priority</system:String>
142143
<system:String x:Key="priority_tips">Greater the number, the higher the result will be ranked. Try setting it as 5. If you want the results to be lower than any other plugin's, provide a negative number</system:String>
143144
<system:String x:Key="invalidPriority">Please provide an valid integer for Priority!</system:String>
144145

145-
<!--Action Keyword Setting Dialog-->
146+
<!-- Action Keyword Setting Dialog -->
146147
<system:String x:Key="oldActionKeywords">Old Action Keyword</system:String>
147148
<system:String x:Key="newActionKeywords">New Action Keyword</system:String>
148149
<system:String x:Key="cancel">Cancel</system:String>
@@ -152,20 +153,20 @@
152153
<system:String x:Key="newActionKeywordsHasBeenAssigned">This new Action Keyword is already assigned to another plugin, please choose a different one</system:String>
153154
<system:String x:Key="success">Success</system:String>
154155
<system:String x:Key="completedSuccessfully">Completed successfully</system:String>
155-
<system:String x:Key="actionkeyword_tips">Enter the action keyword you need to start the plug-in. Use * if you don't want to specify an action keyword. In the case, The plug-in works without keywords. </system:String>
156+
<system:String x:Key="actionkeyword_tips">Enter the action keyword you need to start the plug-in. Use * if you don't want to specify an action keyword. In the case, The plug-in works without keywords.</system:String>
156157

157-
<!--Custom Query Hotkey Dialog-->
158+
<!-- Custom Query Hotkey Dialog -->
158159
<system:String x:Key="customeQueryHotkeyTitle">Custom Query Hotkey</system:String>
159160
<system:String x:Key="customeQueryHotkeyTips">Press the custom hotkey to automatically insert the specified query.</system:String>
160161
<system:String x:Key="preview">Preview</system:String>
161162
<system:String x:Key="hotkeyIsNotUnavailable">Hotkey is unavailable, please select a new hotkey</system:String>
162163
<system:String x:Key="invalidPluginHotkey">Invalid plugin hotkey</system:String>
163164
<system:String x:Key="update">Update</system:String>
164165

165-
<!--Hotkey Control-->
166+
<!-- Hotkey Control -->
166167
<system:String x:Key="hotkeyUnavailable">Hotkey Unavailable</system:String>
167168

168-
<!--Crash Reporter-->
169+
<!-- Crash Reporter -->
169170
<system:String x:Key="reportWindow_version">Version</system:String>
170171
<system:String x:Key="reportWindow_time">Time</system:String>
171172
<system:String x:Key="reportWindow_reproduce">Please tell us how application crashed so we can fix it</system:String>
@@ -181,16 +182,18 @@
181182
<system:String x:Key="reportWindow_report_failed">Failed to send report</system:String>
182183
<system:String x:Key="reportWindow_flowlauncher_got_an_error">Flow Launcher got an error</system:String>
183184

184-
<!--General Notice-->
185+
<!-- General Notice -->
185186
<system:String x:Key="pleaseWait">Please wait...</system:String>
186187

187-
<!--update-->
188+
<!-- update -->
188189
<system:String x:Key="update_flowlauncher_update_check">Checking for new update</system:String>
189190
<system:String x:Key="update_flowlauncher_already_on_latest">You already have the latest Flow Launcher version</system:String>
190191
<system:String x:Key="update_flowlauncher_update_found">Update found</system:String>
191192
<system:String x:Key="update_flowlauncher_updating">Updating...</system:String>
192-
<system:String x:Key="update_flowlauncher_fail_moving_portable_user_profile_data">Flow Launcher was not able to move your user profile data to the new update version.
193-
Please manually move your profile data folder from {0} to {1}</system:String>
193+
<system:String x:Key="update_flowlauncher_fail_moving_portable_user_profile_data">
194+
Flow Launcher was not able to move your user profile data to the new update version.
195+
Please manually move your profile data folder from {0} to {1}
196+
</system:String>
194197
<system:String x:Key="update_flowlauncher_new_update">New Update</system:String>
195198
<system:String x:Key="update_flowlauncher_update_new_version_available">New Flow Launcher release {0} is now available</system:String>
196199
<system:String x:Key="update_flowlauncher_update_error">An error occurred while trying to install software updates</system:String>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,23 @@ public void WindowAnimator()
250250
{
251251
From = 0,
252252
To = 1,
253-
Duration = TimeSpan.FromSeconds(0.2),
253+
Duration = TimeSpan.FromSeconds(0.18),
254254
FillBehavior = FillBehavior.Stop
255255
};
256256

257257
var da2 = new DoubleAnimation
258258
{
259259
From = Top + 8,
260260
To = Top,
261-
Duration = TimeSpan.FromSeconds(0.2),
261+
Duration = TimeSpan.FromSeconds(0.18),
262262
FillBehavior = FillBehavior.Stop
263263
};
264264

265265
var da3 = new DoubleAnimation
266266
{
267267
From = Left,
268268
To = Left,
269-
Duration = TimeSpan.FromSeconds(0.1),
269+
Duration = TimeSpan.FromSeconds(0.18),
270270
FillBehavior = FillBehavior.Stop
271271
};
272272
Storyboard.SetTarget(da, this);
@@ -314,8 +314,10 @@ private void OnPreviewDragOver(object sender, DragEventArgs e)
314314
e.Handled = true;
315315
}
316316

317-
private void OnContextMenusForSettingsClick(object sender, RoutedEventArgs e)
317+
private async void OnContextMenusForSettingsClick(object sender, RoutedEventArgs e)
318318
{
319+
_viewModel.Hide();
320+
await Task.Delay(100);
319321
App.API.OpenSettingDialog();
320322
}
321323

0 commit comments

Comments
 (0)