mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Removed the Hide to tray when closing the window feature for Windows version
https://github.com/2dust/v2rayN/issues/6726
This commit is contained in:
parent
eee87ded29
commit
bb8eef3bf5
3 changed files with 22 additions and 10 deletions
|
@ -414,18 +414,17 @@ namespace v2rayN.Desktop.Views
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Utils.IsOSX() || _config.UiItem.Hide2TrayWhenClose)
|
||||
{
|
||||
foreach (var ownedWindow in this.OwnedWindows)
|
||||
{
|
||||
ownedWindow.Close();
|
||||
}
|
||||
this.Hide();
|
||||
}
|
||||
else
|
||||
if (Utils.IsLinux() && _config.UiItem.Hide2TrayWhenClose == false)
|
||||
{
|
||||
this.WindowState = WindowState.Minimized;
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var ownedWindow in this.OwnedWindows)
|
||||
{
|
||||
ownedWindow.Close();
|
||||
}
|
||||
this.Hide();
|
||||
}
|
||||
|
||||
_config.UiItem.ShowInTaskbar = bl;
|
||||
|
|
|
@ -459,6 +459,7 @@
|
|||
Classes="Margin8" />
|
||||
|
||||
<TextBlock
|
||||
x:Name="labHide2TrayWhenClose"
|
||||
Grid.Row="9"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
|
|
|
@ -174,15 +174,27 @@ namespace v2rayN.Desktop.Views
|
|||
if (Utils.IsWindows())
|
||||
{
|
||||
txbSettingsExceptionTip2.IsVisible = false;
|
||||
|
||||
txtLinuxSudoPassword.IsVisible = false;
|
||||
labLinuxSudoPassword.IsVisible = false;
|
||||
labLinuxSudoPasswordTip.IsVisible = false;
|
||||
|
||||
labHide2TrayWhenClose.IsVisible = false;
|
||||
togHide2TrayWhenClose.IsVisible = false;
|
||||
}
|
||||
else
|
||||
else if (Utils.IsLinux())
|
||||
{
|
||||
txbSettingsExceptionTip.IsVisible = false;
|
||||
panSystemProxyAdvanced.IsVisible = false;
|
||||
}
|
||||
else if (Utils.IsOSX())
|
||||
{
|
||||
txbSettingsExceptionTip.IsVisible = false;
|
||||
panSystemProxyAdvanced.IsVisible = false;
|
||||
|
||||
labHide2TrayWhenClose.IsVisible = false;
|
||||
togHide2TrayWhenClose.IsVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
|
||||
|
|
Loading…
Reference in a new issue