From 45858c8fb530ced86b934ac18a618500c55b1788 Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 19 Dec 2021 22:55:17 +0900 Subject: [PATCH] Add Hotkey in tray context menu --- Flow.Launcher/MainWindow.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index cf40c5ebfcb..7eb7f05938f 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -147,6 +147,9 @@ private void OnLoaded(object sender, RoutedEventArgs _) case nameof(Settings.Language): UpdateNotifyIconText(); break; + case nameof(Settings.Hotkey): + UpdateNotifyIconText(); + break; } }; } @@ -168,7 +171,7 @@ private void InitializePosition() private void UpdateNotifyIconText() { var menu = contextMenu; - ((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen"); + ((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")"; ((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode"); ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); @@ -191,7 +194,7 @@ private void InitializeNotifyIcon() }; var open = new MenuItem { - Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" +_settings.Hotkey + ")" }; var gamemode = new MenuItem {