mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
hide tray icon (close #563)
This commit is contained in:
parent
7fe01f0764
commit
3dac6fd1c3
5 changed files with 23 additions and 1 deletions
|
|
@ -44,6 +44,16 @@ namespace Wox.Infrastructure.UserSettings
|
|||
|
||||
public bool StartWoxOnSystemStartup { get; set; } = true;
|
||||
public bool HideOnStartup { get; set; }
|
||||
bool _hideNotifyIcon { get; set; }
|
||||
public bool HideNotifyIcon
|
||||
{
|
||||
get { return _hideNotifyIcon; }
|
||||
set
|
||||
{
|
||||
_hideNotifyIcon = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
public bool LeaveCmdOpen { get; set; }
|
||||
public bool HideWhenDeactive { get; set; }
|
||||
public bool RememberLastLaunchLocation { get; set; }
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
<system:String x:Key="autoUpdates">Auto Update</system:String>
|
||||
<system:String x:Key="selectPythonDirectory">Select</system:String>
|
||||
<system:String x:Key="hideOnStartup">Hide Wox on startup</system:String>
|
||||
<system:String x:Key="hideNotifyIcon">Hide tray icon</system:String>
|
||||
|
||||
<!--Setting Plugin-->
|
||||
<system:String x:Key="plugin">Plugin</system:String>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
<system:String x:Key="autoUpdates">自动更新</system:String>
|
||||
<system:String x:Key="selectPythonDirectory">Select</system:String>
|
||||
<system:String x:Key="hideOnStartup">启动时不显示主窗口</system:String>
|
||||
<system:String x:Key="hideNotifyIcon">隐藏任务栏图标</system:String>
|
||||
|
||||
<!--设置,插件-->
|
||||
<system:String x:Key="plugin">插件</system:String>
|
||||
|
|
|
|||
|
|
@ -85,6 +85,13 @@ namespace Wox
|
|||
}
|
||||
}
|
||||
};
|
||||
_settings.PropertyChanged += (o, e) =>
|
||||
{
|
||||
if (e.PropertyName == nameof(Settings.HideNotifyIcon))
|
||||
{
|
||||
_notifyIcon.Visible = !_settings.HideNotifyIcon;
|
||||
}
|
||||
};
|
||||
InitializePosition();
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +109,7 @@ namespace Wox
|
|||
{
|
||||
Text = Infrastructure.Constant.Wox,
|
||||
Icon = Properties.Resources.app,
|
||||
Visible = true
|
||||
Visible = !_settings.HideNotifyIcon
|
||||
};
|
||||
var menu = new ContextMenuStrip();
|
||||
var items = menu.Items;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@
|
|||
<CheckBox Margin="10" IsChecked="{Binding Settings.HideWhenDeactive}">
|
||||
<TextBlock Text="{DynamicResource hideWoxWhenLoseFocus}" />
|
||||
</CheckBox>
|
||||
<CheckBox Margin="10" IsChecked="{Binding Settings.HideNotifyIcon}">
|
||||
<TextBlock Text="{DynamicResource hideNotifyIcon}" />
|
||||
</CheckBox>
|
||||
<CheckBox Margin="10" IsChecked="{Binding Settings.RememberLastLaunchLocation}">
|
||||
<TextBlock Text="{DynamicResource rememberLastLocation}" />
|
||||
</CheckBox>
|
||||
|
|
|
|||
Loading…
Reference in a new issue