- change string vs to sn (sticky notes)

- Add ClearFocus When Set hotkey
- Add get focus when click window
This commit is contained in:
DB p 2021-12-04 02:06:42 +09:00
parent f3c0c3384d
commit 0ed52a2c9c
5 changed files with 24 additions and 5 deletions

View file

@ -78,6 +78,7 @@ namespace Flow.Launcher
}
tbMsg.Visibility = Visibility.Visible;
OnHotkeyChanged();
Keyboard.ClearFocus();
}
}

View file

@ -265,7 +265,7 @@
<system:String x:Key="RecommendShellDesc">Shell Command</system:String>
<system:String x:Key="RecommendBluetooth">Bluetooth</system:String>
<system:String x:Key="RecommendBluetoothDesc">Bluetooth in Windows Setting</system:String>
<system:String x:Key="RecommendAcronyms">vs</system:String>
<system:String x:Key="RecommendAcronymsDesc">Visual Studio</system:String>
<system:String x:Key="RecommendAcronyms">sn</system:String>
<system:String x:Key="RecommendAcronymsDesc">Sticky Notes</system:String>
</ResourceDictionary>

View file

@ -258,13 +258,13 @@
<system:String x:Key="HotkeyCtrlIDesc">설정창 열기</system:String>
<system:String x:Key="HotkeyF5Desc">플러그인 데이터 새로고침</system:String>
<system:String x:Key="RecommendWeather">g 날씨</system:String>
<system:String x:Key="RecommendWeather">날씨</system:String>
<system:String x:Key="RecommendWeatherDesc">구글 날씨 검색</system:String>
<system:String x:Key="RecommendShell">&gt; ping 8.8.8.8</system:String>
<system:String x:Key="RecommendShellDesc">쉘 명령어</system:String>
<system:String x:Key="RecommendBluetooth">블루투스</system:String>
<system:String x:Key="RecommendBluetoothDesc">윈도우 블루투스 설정</system:String>
<system:String x:Key="RecommendAcronyms">vs</system:String>
<system:String x:Key="RecommendAcronymsDesc">Visual Studio</system:String>
<system:String x:Key="RecommendAcronyms">스메</system:String>
<system:String x:Key="RecommendAcronymsDesc">스티커 메모</system:String>
</ResourceDictionary>

View file

@ -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"

View file

@ -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();
}
}
}