mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-25 02:00:12 +08:00
Fix #729: add a config flag to hide the tray icon
This commit is contained in:
@@ -48,7 +48,6 @@ namespace QuickLook
|
||||
Text = string.Format(TranslationHelper.Get("Icon_ToolTip"),
|
||||
Application.ProductVersion),
|
||||
Icon = GetTrayIconByDPI(),
|
||||
Visible = true,
|
||||
ContextMenu = new ContextMenu(new[]
|
||||
{
|
||||
new MenuItem($"v{Application.ProductVersion}{(App.IsUWP ? " (UWP)" : "")}") {Enabled = false},
|
||||
@@ -59,7 +58,8 @@ namespace QuickLook
|
||||
_itemAutorun,
|
||||
new MenuItem(TranslationHelper.Get("Icon_Quit"),
|
||||
(sender, e) => System.Windows.Application.Current.Shutdown())
|
||||
})
|
||||
}),
|
||||
Visible = SettingHelper.Get("ShowTrayIcon", true)
|
||||
};
|
||||
|
||||
_icon.ContextMenu.Popup += (sender, e) => { _itemAutorun.Checked = AutoStartupHelper.IsAutorun(); };
|
||||
@@ -67,6 +67,8 @@ namespace QuickLook
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
SettingHelper.Set("ShowTrayIcon", _icon.Visible);
|
||||
|
||||
_icon.Visible = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user