From 5f49c436e7be8c27176c0a3a6e45ce8e084414cc Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 25 Jun 2025 20:28:01 +0800 Subject: [PATCH] Display plugin hotkey setting --- .../Views/SettingsPaneHotkey.xaml | 25 +++++--- .../Views/SettingsPaneHotkey.xaml.cs | 61 ++++++++++++++++++- 2 files changed, 75 insertions(+), 11 deletions(-) diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml index 74e79e080..c145d16a1 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml @@ -204,19 +204,18 @@ - - - + + + - + + h.Id == hotkey.Id)?.Hotkey ?? hotkey.DefaultHotkey; + if (hotkey.Editable) + { + // TODO: Check if this can use + var hotkeyControl = new HotkeyControl + { + DefaultHotkey = hotkey.DefaultHotkey, + Hotkey = hotkeySetting, + Type = HotkeyControl.HotkeyType.CustomQueryHotkey, + ValidateKeyGesture = true + }; + card.Content = hotkeyControl; + // TODO: Update metadata & plugin setting hotkey + } + else + { + var hotkeyDisplay = new HotkeyDisplay + { + Keys = hotkeySetting + }; + card.Content = hotkeyDisplay; + } + hotkeyStackPanel.Children.Add(card); + } + excard.Content = hotkeyStackPanel; + PluginHotkeySettings.Children.Add(excard); + } + } }