mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-12 07:24:59 +03:00
Optimization and improvement, tray, etc.
https://github.com/2dust/v2rayN/pull/8083
This commit is contained in:
@@ -412,7 +412,10 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
|
||||
|
||||
public void ShowHideWindow(bool? blShow)
|
||||
{
|
||||
var bl = blShow ?? (!_config.UiItem.ShowInTaskbar ^ (WindowState == WindowState.Minimized));
|
||||
var bl = blShow ??
|
||||
Utils.IsLinux()
|
||||
? (!_config.UiItem.ShowInTaskbar ^ (WindowState == WindowState.Minimized))
|
||||
: !_config.UiItem.ShowInTaskbar;
|
||||
if (bl)
|
||||
{
|
||||
this.Show();
|
||||
@@ -446,8 +449,7 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
|
||||
base.OnLoaded(sender, e);
|
||||
if (_config.UiItem.AutoHideStartup)
|
||||
{
|
||||
this.ShowHideWindow(false);
|
||||
_config.UiItem.ShowInTaskbar = true;
|
||||
ShowHideWindow(false);
|
||||
}
|
||||
RestoreUI();
|
||||
}
|
||||
|
||||
@@ -355,14 +355,15 @@
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
<!--
|
||||
<TextBlock
|
||||
<TextBlock
|
||||
x:Name="tbAutoRunTip"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Static resx:ResUI.TbSettingsStartBootTip}"
|
||||
TextWrapping="Wrap" />-->
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
@@ -467,6 +468,13 @@
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
<TextBlock
|
||||
x:Name="labHide2TrayWhenCloseTip"
|
||||
Grid.Row="9"
|
||||
Grid.Column="2"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Static resx:ResUI.TbSettingsHide2TrayWhenCloseTip}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="11"
|
||||
|
||||
@@ -131,19 +131,25 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||
|
||||
labHide2TrayWhenClose.IsVisible = false;
|
||||
togHide2TrayWhenClose.IsVisible = false;
|
||||
labHide2TrayWhenCloseTip.IsVisible = false;
|
||||
}
|
||||
else if (Utils.IsLinux())
|
||||
{
|
||||
txbSettingsExceptionTip.IsVisible = false;
|
||||
panSystemProxyAdvanced.IsVisible = false;
|
||||
|
||||
tbAutoRunTip.IsVisible = false;
|
||||
}
|
||||
else if (Utils.IsOSX())
|
||||
{
|
||||
txbSettingsExceptionTip.IsVisible = false;
|
||||
panSystemProxyAdvanced.IsVisible = false;
|
||||
|
||||
tbAutoRunTip.IsVisible = false;
|
||||
|
||||
labHide2TrayWhenClose.IsVisible = false;
|
||||
togHide2TrayWhenClose.IsVisible = false;
|
||||
labHide2TrayWhenCloseTip.IsVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user