From 0ed52a2c9c4ada7b97a7062b1754d2c1a028abd1 Mon Sep 17 00:00:00 2001 From: DB p Date: Sat, 4 Dec 2021 02:06:42 +0900 Subject: [PATCH] - change string vs to sn (sticky notes) - Add ClearFocus When Set hotkey - Add get focus when click window --- Flow.Launcher/HotkeyControl.xaml.cs | 1 + Flow.Launcher/Languages/en.xaml | 4 ++-- Flow.Launcher/Languages/ko.xaml | 6 +++--- Flow.Launcher/WelcomeWindow.xaml | 2 ++ Flow.Launcher/WelcomeWindow.xaml.cs | 16 ++++++++++++++++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index c8d0bef43..dd7a138d4 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -78,6 +78,7 @@ namespace Flow.Launcher } tbMsg.Visibility = Visibility.Visible; OnHotkeyChanged(); + Keyboard.ClearFocus(); } } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 6f0b420be..78daee8bb 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -265,7 +265,7 @@ Shell Command Bluetooth Bluetooth in Windows Setting - vs - Visual Studio + sn + Sticky Notes diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index bbf290f78..66d101a5a 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -258,13 +258,13 @@ 설정창 열기 플러그인 데이터 새로고침 - g 날씨 + 날씨 구글 날씨 검색 > ping 8.8.8.8 쉘 명령어 블루투스 윈도우 블루투스 설정 - vs - Visual Studio + 스메 + 스티커 메모 \ No newline at end of file diff --git a/Flow.Launcher/WelcomeWindow.xaml b/Flow.Launcher/WelcomeWindow.xaml index 93f41d278..d797a623b 100644 --- a/Flow.Launcher/WelcomeWindow.xaml +++ b/Flow.Launcher/WelcomeWindow.xaml @@ -8,8 +8,10 @@ xmlns:ui="http://schemas.modernwpf.com/2019" Name="FlowWelcomeWindow" Title="Welcome to Flow Launcher" + Activated="OnActivated" Width="550" Height="650" + MouseDown="window_MouseDown" Background="{DynamicResource Color00B}" Foreground="{DynamicResource PopupTextColor}" WindowStartupLocation="CenterScreen" diff --git a/Flow.Launcher/WelcomeWindow.xaml.cs b/Flow.Launcher/WelcomeWindow.xaml.cs index b41bfa23b..eaa993872 100644 --- a/Flow.Launcher/WelcomeWindow.xaml.cs +++ b/Flow.Launcher/WelcomeWindow.xaml.cs @@ -1,5 +1,7 @@ using System; using System.Windows; +using System.Windows.Input; +using System.Windows.Controls; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Resources.Pages; using ModernWpf.Media.Animation; @@ -90,5 +92,19 @@ namespace Flow.Launcher _ => throw new ArgumentOutOfRangeException(nameof(pageNumber), pageNumber, "Unexpected Page Number") }; } + + private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ + { + if (Keyboard.FocusedElement is not TextBox textBox) + { + return; + } + var tRequest = new TraversalRequest(FocusNavigationDirection.Next); + textBox.MoveFocus(tRequest); + } + private void OnActivated(object sender, EventArgs e) + { + Keyboard.ClearFocus(); + } } } \ No newline at end of file