diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml index 0f1c5578a..ded2d9284 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Flow.Launcher.Plugin.Explorer.Views" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - Title="{DynamicResource plugin_explorer_manageactionkeywords_header}" + Title="" Height="180" MaxWidth="600" Background="{DynamicResource PopuBGColor}" diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml.cs index 4591fa76e..323bb912f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/RenameFile.xaml.cs @@ -39,6 +39,14 @@ namespace Flow.Launcher.Plugin.Explorer.Views ShowInTaskbar = false; RenameTb.Focus(); + var window = Window.GetWindow(this); + window.KeyDown += (s, e) => + { + if (e.Key == Key.Escape) + { + Close(); + } + }; } /// @@ -55,10 +63,11 @@ namespace Flow.Launcher.Plugin.Explorer.Views else if (_info is FileInfo info) { string properName = Path.GetFileNameWithoutExtension(info.Name); - Application.Current.Dispatcher.Invoke(textBox.Select, DispatcherPriority.Background, textBox.Text.IndexOf(properName), properName.Length ); + Application.Current.Dispatcher.Invoke(textBox.Select, DispatcherPriority.Background, textBox.Text.IndexOf(properName), properName.Length); } } + private void OnDoneButtonClick(object sender, RoutedEventArgs e) { RenameThing.Rename(NewFileName, _info, _api);