Skip to content

Commit b3155bc

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into GlobalHotkeyRefactor
2 parents 7d4a9c3 + 1e18e26 commit b3155bc

File tree

91 files changed

+45576
-800
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+45576
-800
lines changed

Flow.Launcher.Core/Plugin/PythonPlugin.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Diagnostics;
33
using System.IO;
44
using System.Threading;
@@ -28,6 +28,11 @@ public PythonPlugin(string filename)
2828
var path = Path.Combine(Constant.ProgramDirectory, JsonRPC);
2929
_startInfo.EnvironmentVariables["PYTHONPATH"] = path;
3030

31+
_startInfo.EnvironmentVariables["FLOW_VERSION"] = Constant.Version;
32+
_startInfo.EnvironmentVariables["FLOW_PROGRAM_DIRECTORY"] = Constant.ProgramDirectory;
33+
_startInfo.EnvironmentVariables["FLOW_APPLICATION_DIRECTORY"] = Constant.ApplicationDirectory;
34+
35+
3136
//Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable
3237
_startInfo.ArgumentList.Add("-B");
3338
}
@@ -57,4 +62,4 @@ public override Task InitAsync(PluginInitContext context)
5762
return Task.CompletedTask;
5863
}
5964
}
60-
}
65+
}

Flow.Launcher.Core/Resource/Internationalization.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Flow.Launcher.Infrastructure.UserSettings;
1111
using Flow.Launcher.Plugin;
1212
using System.Globalization;
13+
using System.Threading.Tasks;
1314

1415
namespace Flow.Launcher.Core.Resource
1516
{
@@ -95,10 +96,13 @@ public void ChangeLanguage(Language language)
9596
{
9697
LoadLanguage(language);
9798
}
98-
UpdatePluginMetadataTranslations();
9999
Settings.Language = language.LanguageCode;
100100
CultureInfo.CurrentCulture = new CultureInfo(language.LanguageCode);
101101
CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture;
102+
Task.Run(() =>
103+
{
104+
UpdatePluginMetadataTranslations();
105+
});
102106
}
103107

104108
public bool PromptShouldUsePinyin(string languageCodeToSet)

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Settings : BaseModel
1515
private string language = "en";
1616
public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}";
1717
public string OpenResultModifiers { get; set; } = KeyConstant.Alt;
18-
public string DarkMode { get; set; } = "System";
18+
public string ColorScheme { get; set; } = "System";
1919
public bool ShowOpenResultHotkey { get; set; } = true;
2020
public double WindowSize { get; set; } = 580;
2121

@@ -39,6 +39,7 @@ public string Language
3939
public string ResultFontWeight { get; set; }
4040
public string ResultFontStretch { get; set; }
4141
public bool UseGlyphIcons { get; set; } = true;
42+
public bool FirstLaunch { get; set; } = true;
4243

4344
public int CustomExplorerIndex { get; set; } = 0;
4445

@@ -133,8 +134,8 @@ public string QuerySearchPrecisionString
133134
public bool DontPromptUpdateMsg { get; set; }
134135
public bool EnableUpdateLog { get; set; }
135136

136-
public bool StartFlowLauncherOnSystemStartup { get; set; } = true;
137-
public bool HideOnStartup { get; set; }
137+
public bool StartFlowLauncherOnSystemStartup { get; set; } = false;
138+
public bool HideOnStartup { get; set; } = true;
138139
bool _hideNotifyIcon { get; set; }
139140
public bool HideNotifyIcon
140141
{
@@ -167,7 +168,7 @@ public enum LastQueryMode
167168
Preserved
168169
}
169170

170-
public enum DarkMode
171+
public enum ColorSchemes
171172
{
172173
System,
173174
Light,

Flow.Launcher.Plugin/Interfaces/IPluginI18n.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace Flow.Launcher.Plugin
1+
using System.Globalization;
2+
3+
namespace Flow.Launcher.Plugin
24
{
35
/// <summary>
46
/// Represent plugins that support internationalization
@@ -8,5 +10,13 @@ public interface IPluginI18n : IFeatures
810
string GetTranslatedPluginTitle();
911

1012
string GetTranslatedPluginDescription();
13+
14+
/// <summary>
15+
/// The method will be invoked when language of flow changed
16+
/// </summary>
17+
void OnCultureInfoChanged(CultureInfo newCulture)
18+
{
19+
20+
}
1121
}
1222
}

Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ public interface IPublicAPI
3737
/// <exception cref="FileNotFoundException">Thrown when unable to find the file specified in the command </exception>
3838
/// <exception cref="Win32Exception">Thrown when error occurs during the execution of the command </exception>
3939
void ShellRun(string cmd, string filename = "cmd.exe");
40+
41+
/// <summary>
42+
/// Copy Text to clipboard
43+
/// </summary>
44+
/// <param name="Text">Text to save on clipboard</param>
45+
public void CopyToClipboard(string text);
4046

4147
/// <summary>
4248
/// Save everything, all of Flow Launcher and plugins' data and settings

Flow.Launcher.Plugin/Result.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ public class Result
2929
/// </summary>
3030
public string ActionKeywordAssigned { get; set; }
3131

32+
/// <summary>
33+
/// This holds the text which can be provided by plugin to help Flow autocomplete text
34+
/// for user on the plugin result. If autocomplete action for example is tab, pressing tab will have
35+
/// the default constructed autocomplete text (result's Title), or the text provided here if not empty.
36+
/// </summary>
37+
public string AutoCompleteText { get; set; }
38+
3239
public string IcoPath
3340
{
3441
get { return _icoPath; }

Flow.Launcher.sln

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{3A73
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher", "Flow.Launcher\Flow.Launcher.csproj", "{DB90F671-D861-46BB-93A3-F1304F5BA1C5}"
1515
ProjectSection(ProjectDependencies) = postProject
16-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0} = {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}
1716
{0B9DE348-9361-4940-ADB6-F5953BFFCCEC} = {0B9DE348-9361-4940-ADB6-F5953BFFCCEC}
1817
{4792A74A-0CEA-4173-A8B2-30E6764C6217} = {4792A74A-0CEA-4173-A8B2-30E6764C6217}
1918
{FDB3555B-58EF-4AE6-B5F1-904719637AB4} = {FDB3555B-58EF-4AE6-B5F1-904719637AB4}
@@ -23,6 +22,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher", "Flow.Launc
2322
{9B130CC5-14FB-41FF-B310-0A95B6894C37} = {9B130CC5-14FB-41FF-B310-0A95B6894C37}
2423
{FDED22C8-B637-42E8-824A-63B5B6E05A3A} = {FDED22C8-B637-42E8-824A-63B5B6E05A3A}
2524
{A3DCCBCA-ACC1-421D-B16E-210896234C26} = {A3DCCBCA-ACC1-421D-B16E-210896234C26}
25+
{5043CECE-E6A7-4867-9CBE-02D27D83747A} = {5043CECE-E6A7-4867-9CBE-02D27D83747A}
2626
{403B57F2-1856-4FC7-8A24-36AB346B763E} = {403B57F2-1856-4FC7-8A24-36AB346B763E}
2727
{588088F4-3262-4F9F-9663-A05DE12534C3} = {588088F4-3262-4F9F-9663-A05DE12534C3}
2828
EndProjectSection
@@ -35,8 +35,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Progra
3535
EndProject
3636
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.WebSearch", "Plugins\Flow.Launcher.Plugin.WebSearch\Flow.Launcher.Plugin.WebSearch.csproj", "{403B57F2-1856-4FC7-8A24-36AB346B763E}"
3737
EndProject
38-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.ControlPanel", "Plugins\Flow.Launcher.Plugin.ControlPanel\Flow.Launcher.Plugin.ControlPanel.csproj", "{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}"
39-
EndProject
4038
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.PluginIndicator", "Plugins\Flow.Launcher.Plugin.PluginIndicator\Flow.Launcher.Plugin.PluginIndicator.csproj", "{FDED22C8-B637-42E8-824A-63B5B6E05A3A}"
4139
EndProject
4240
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Sys", "Plugins\Flow.Launcher.Plugin.Sys\Flow.Launcher.Plugin.Sys.csproj", "{0B9DE348-9361-4940-ADB6-F5953BFFCCEC}"
@@ -68,6 +66,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Proces
6866
EndProject
6967
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.PluginsManager", "Plugins\Flow.Launcher.Plugin.PluginsManager\Flow.Launcher.Plugin.PluginsManager.csproj", "{4792A74A-0CEA-4173-A8B2-30E6764C6217}"
7068
EndProject
69+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.WindowsSettings", "Plugins\Flow.Launcher.Plugin.WindowsSettings\Flow.Launcher.Plugin.WindowsSettings.csproj", "{5043CECE-E6A7-4867-9CBE-02D27D83747A}"
70+
EndProject
7171
Global
7272
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7373
Debug|Any CPU = Debug|Any CPU
@@ -162,18 +162,6 @@ Global
162162
{403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x64.Build.0 = Release|Any CPU
163163
{403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.ActiveCfg = Release|Any CPU
164164
{403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.Build.0 = Release|Any CPU
165-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
166-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
167-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.ActiveCfg = Debug|Any CPU
168-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.Build.0 = Debug|Any CPU
169-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.ActiveCfg = Debug|Any CPU
170-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.Build.0 = Debug|Any CPU
171-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
172-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.Build.0 = Release|Any CPU
173-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.ActiveCfg = Release|Any CPU
174-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.Build.0 = Release|Any CPU
175-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x86.ActiveCfg = Release|Any CPU
176-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x86.Build.0 = Release|Any CPU
177165
{FDED22C8-B637-42E8-824A-63B5B6E05A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
178166
{FDED22C8-B637-42E8-824A-63B5B6E05A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
179167
{FDED22C8-B637-42E8-824A-63B5B6E05A3A}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -283,14 +271,25 @@ Global
283271
{4792A74A-0CEA-4173-A8B2-30E6764C6217}.Release|x64.Build.0 = Release|Any CPU
284272
{4792A74A-0CEA-4173-A8B2-30E6764C6217}.Release|x86.ActiveCfg = Release|Any CPU
285273
{4792A74A-0CEA-4173-A8B2-30E6764C6217}.Release|x86.Build.0 = Release|Any CPU
274+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
275+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|Any CPU.Build.0 = Debug|Any CPU
276+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|x64.ActiveCfg = Debug|Any CPU
277+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|x64.Build.0 = Debug|Any CPU
278+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|x86.ActiveCfg = Debug|Any CPU
279+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|x86.Build.0 = Debug|Any CPU
280+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|Any CPU.ActiveCfg = Release|Any CPU
281+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|Any CPU.Build.0 = Release|Any CPU
282+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|x64.ActiveCfg = Release|Any CPU
283+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|x64.Build.0 = Release|Any CPU
284+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|x86.ActiveCfg = Release|Any CPU
285+
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|x86.Build.0 = Release|Any CPU
286286
EndGlobalSection
287287
GlobalSection(SolutionProperties) = preSolution
288288
HideSolutionNode = FALSE
289289
EndGlobalSection
290290
GlobalSection(NestedProjects) = preSolution
291291
{FDB3555B-58EF-4AE6-B5F1-904719637AB4} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
292292
{403B57F2-1856-4FC7-8A24-36AB346B763E} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
293-
{1EE20B48-82FB-48A2-8086-675D6DDAB4F0} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
294293
{FDED22C8-B637-42E8-824A-63B5B6E05A3A} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
295294
{0B9DE348-9361-4940-ADB6-F5953BFFCCEC} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
296295
{A3DCCBCA-ACC1-421D-B16E-210896234C26} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
@@ -300,6 +299,7 @@ Global
300299
{F9C4C081-4CC3-4146-95F1-E102B4E10A5F} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
301300
{588088F4-3262-4F9F-9663-A05DE12534C3} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
302301
{4792A74A-0CEA-4173-A8B2-30E6764C6217} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
302+
{5043CECE-E6A7-4867-9CBE-02D27D83747A} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87}
303303
EndGlobalSection
304304
GlobalSection(ExtensibilityGlobals) = postSolution
305305
SolutionGuid = {F26ACB50-3F6C-4907-B0C9-1ADACC1D0DED}

Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Globalization;
3+
using System.Windows.Controls;
34
using System.Windows.Data;
5+
using System.Windows.Media;
46
using Flow.Launcher.Infrastructure.Logger;
57
using Flow.Launcher.ViewModel;
68

@@ -10,13 +12,13 @@ public class QuerySuggestionBoxConverter : IMultiValueConverter
1012
{
1113
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
1214
{
13-
if (values.Length != 2)
15+
if (values.Length != 3)
1416
{
1517
return string.Empty;
1618
}
19+
var QueryTextBox = values[0] as TextBox;
1720

18-
// first prop is the current query string
19-
var queryText = (string)values[0];
21+
var queryText = (string)values[2];
2022

2123
if (string.IsNullOrEmpty(queryText))
2224
return string.Empty;
@@ -43,8 +45,20 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
4345
if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase))
4446
return string.Empty;
4547

48+
49+
// For AutocompleteQueryCommand.
4650
// When user typed lower case and result title is uppercase, we still want to display suggestion
47-
return queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
51+
selectedItem.QuerySuggestionText = queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
52+
53+
// Check if Text will be larger then our QueryTextBox
54+
System.Windows.Media.Typeface typeface = new Typeface(QueryTextBox.FontFamily, QueryTextBox.FontStyle, QueryTextBox.FontWeight, QueryTextBox.FontStretch);
55+
System.Windows.Media.FormattedText ft = new FormattedText(QueryTextBox.Text, System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, typeface, QueryTextBox.FontSize, Brushes.Black);
56+
if (ft.Width > QueryTextBox.ActualWidth || QueryTextBox.HorizontalOffset != 0)
57+
{
58+
return string.Empty;
59+
};
60+
61+
return selectedItem.QuerySuggestionText;
4862
}
4963
catch (Exception e)
5064
{

Flow.Launcher/HotkeyControl.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
VerticalContentAlignment="Center"
5151
input:InputMethod.IsInputMethodEnabled="False"
5252
PreviewKeyDown="TbHotkey_OnPreviewKeyDown"
53-
TabIndex="100" />
53+
TabIndex="100"
54+
LostFocus="tbHotkey_LostFocus"/>
5455
</Grid>
5556
</UserControl>

Flow.Launcher/HotkeyControl.xaml.cs

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
using Flow.Launcher.Helper;
99
using Flow.Launcher.Infrastructure.Hotkey;
1010
using Flow.Launcher.Plugin;
11+
using System.Threading;
1112

1213
namespace Flow.Launcher
1314
{
1415
public partial class HotkeyControl : UserControl
1516
{
17+
private Brush tbMsgForegroundColorOriginal;
18+
19+
private string tbMsgTextOriginal;
20+
1621
public HotkeyModel CurrentHotkey { get; private set; }
1722
public bool CurrentHotkeyAvailable { get; private set; }
1823

@@ -23,15 +28,22 @@ public partial class HotkeyControl : UserControl
2328
public HotkeyControl()
2429
{
2530
InitializeComponent();
31+
tbMsgTextOriginal = tbMsg.Text;
32+
tbMsgForegroundColorOriginal = tbMsg.Foreground;
2633
}
2734

28-
void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
35+
private CancellationTokenSource hotkeyUpdateSource;
36+
37+
private void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
2938
{
39+
hotkeyUpdateSource?.Cancel();
40+
hotkeyUpdateSource?.Dispose();
41+
hotkeyUpdateSource = new();
42+
var token = hotkeyUpdateSource.Token;
3043
e.Handled = true;
31-
tbMsg.Visibility = Visibility.Hidden;
3244

3345
//when alt is pressed, the real key should be e.SystemKey
34-
Key key = (e.Key == Key.System ? e.SystemKey : e.Key);
46+
Key key = e.Key == Key.System ? e.SystemKey : e.Key;
3547

3648
SpecialKeyState specialKeyState = GlobalHotkey.CheckModifiers();
3749

@@ -49,14 +61,15 @@ void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
4961
return;
5062
}
5163

52-
Dispatcher.InvokeAsync(async () =>
64+
_ = Dispatcher.InvokeAsync(async () =>
5365
{
54-
await Task.Delay(500);
55-
SetHotkey(hotkeyModel);
66+
await Task.Delay(500, token);
67+
if (!token.IsCancellationRequested)
68+
await SetHotkey(hotkeyModel);
5669
});
5770
}
5871

59-
public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
72+
public async Task SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
6073
{
6174
CurrentHotkey = keyModel;
6275

@@ -78,6 +91,13 @@ public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
7891
}
7992
tbMsg.Visibility = Visibility.Visible;
8093
OnHotkeyChanged();
94+
95+
var token = hotkeyUpdateSource.Token;
96+
await Task.Delay(500, token);
97+
if (token.IsCancellationRequested)
98+
return;
99+
FocusManager.SetFocusedElement(FocusManager.GetFocusScope(this), null);
100+
Keyboard.ClearFocus();
81101
}
82102
}
83103

@@ -88,9 +108,12 @@ public void SetHotkey(string keyStr, bool triggerValidate = true)
88108

89109
private bool CheckHotkeyAvailability() => HotKeyMapper.CheckAvailability(CurrentHotkey);
90110

91-
public new bool IsFocused
111+
public new bool IsFocused => tbHotkey.IsFocused;
112+
113+
private void tbHotkey_LostFocus(object sender, RoutedEventArgs e)
92114
{
93-
get { return tbHotkey.IsFocused; }
115+
tbMsg.Text = tbMsgTextOriginal;
116+
tbMsg.Foreground = tbMsgForegroundColorOriginal;
94117
}
95118
}
96-
}
119+
}

0 commit comments

Comments
 (0)