mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix some issue
This commit is contained in:
parent
fb3eb06c74
commit
fa0f4981c7
2 changed files with 4 additions and 6 deletions
|
|
@ -92,14 +92,12 @@
|
|||
Grid.Column="1"
|
||||
Width="Auto"
|
||||
Checked="HotkeyBtn_OnChecked"
|
||||
Unchecked="HotkeyBtn_OnUnchecked"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource Color01B}"
|
||||
GroupName="HotkeyReg"
|
||||
KeyboardNavigation.TabNavigation="Continue"
|
||||
PreviewKeyDown="OnPreviewKeyDown"
|
||||
LostFocus="HotkeyBtn_OnLostFocus"
|
||||
Style="{StaticResource {x:Type ToggleButton}}">
|
||||
<RadioButton.Template>
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace Flow.Launcher
|
|||
if (d is HotkeyControl hotkeyControl)
|
||||
{
|
||||
hotkeyControl.SetKeysToDisplay(new HotkeyModel(hotkeyControl.Hotkey));
|
||||
hotkeyControl.CurrentHotkey = new HotkeyModel(hotkeyControl.Hotkey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -202,8 +203,6 @@ namespace Flow.Launcher
|
|||
|
||||
private void ResetToDefault()
|
||||
{
|
||||
HotkeyBtn.IsChecked = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(Hotkey))
|
||||
HotKeyMapper.RemoveHotkey(Hotkey);
|
||||
Hotkey = DefaultHotkey;
|
||||
|
|
@ -212,6 +211,8 @@ namespace Flow.Launcher
|
|||
SetKeysToDisplay(CurrentHotkey);
|
||||
|
||||
SetHotkey(CurrentHotkey);
|
||||
|
||||
HotkeyBtn.IsChecked = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -241,12 +242,11 @@ namespace Flow.Launcher
|
|||
|
||||
public void Delete()
|
||||
{
|
||||
HotkeyBtn.IsChecked = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(Hotkey))
|
||||
HotKeyMapper.RemoveHotkey(Hotkey);
|
||||
Hotkey = "";
|
||||
SetKeysToDisplay(KeysToDisplay, new List<string>());
|
||||
HotkeyBtn.IsChecked = false;
|
||||
}
|
||||
|
||||
private void SetKeysToDisplay(HotkeyModel hotkey)
|
||||
|
|
|
|||
Loading…
Reference in a new issue