mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-12 18:32:52 +00:00
Add macOS Dock visibility option to settings
This commit is contained in:
parent
1990850d9a
commit
6e38357b7d
11 changed files with 50 additions and 1 deletions
11
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
11
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
|
@ -19,7 +19,7 @@ namespace ServiceLib.Resx {
|
|||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class ResUI {
|
||||
|
|
@ -3852,6 +3852,15 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 macOS displays this in the Dock (requires restart) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbSettingsMacOSShowInDock {
|
||||
get {
|
||||
return ResourceManager.GetString("TbSettingsMacOSShowInDock", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Main layout orientation (requires restart) 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1632,4 +1632,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>Custom system proxy script file path</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1629,4 +1629,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>Chemin script proxy système personnalisé</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1632,4 +1632,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>Custom system proxy script file path</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1632,4 +1632,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>Custom system proxy script file path</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1632,4 +1632,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>Custom system proxy script file path</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1629,4 +1629,7 @@
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>自定义系统代理脚本文件路径</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS 在 Dock 栏中显示 (需重启)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1629,4 +1629,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbSettingsCustomSystemProxyScriptPath" xml:space="preserve">
|
||||
<value>自訂系統代理程式腳本檔案路徑</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS 在 Dock 欄顯示 (需重啟)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -50,6 +50,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
[Reactive] public bool EnableUpdateSubOnlyRemarksExist { get; set; }
|
||||
[Reactive] public bool AutoHideStartup { get; set; }
|
||||
[Reactive] public bool Hide2TrayWhenClose { get; set; }
|
||||
[Reactive] public bool MacOSShowInDock { get; set; }
|
||||
[Reactive] public bool EnableDragDropSort { get; set; }
|
||||
[Reactive] public bool DoubleClick2Activate { get; set; }
|
||||
[Reactive] public int AutoUpdateInterval { get; set; }
|
||||
|
|
@ -182,6 +183,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
EnableUpdateSubOnlyRemarksExist = _config.UiItem.EnableUpdateSubOnlyRemarksExist;
|
||||
AutoHideStartup = _config.UiItem.AutoHideStartup;
|
||||
Hide2TrayWhenClose = _config.UiItem.Hide2TrayWhenClose;
|
||||
MacOSShowInDock = _config.UiItem.MacOSShowInDock;
|
||||
EnableDragDropSort = _config.UiItem.EnableDragDropSort;
|
||||
DoubleClick2Activate = _config.UiItem.DoubleClick2Activate;
|
||||
AutoUpdateInterval = _config.GuiItem.AutoUpdateInterval;
|
||||
|
|
@ -343,6 +345,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
_config.UiItem.EnableUpdateSubOnlyRemarksExist = EnableUpdateSubOnlyRemarksExist;
|
||||
_config.UiItem.AutoHideStartup = AutoHideStartup;
|
||||
_config.UiItem.Hide2TrayWhenClose = Hide2TrayWhenClose;
|
||||
_config.UiItem.MacOSShowInDock = MacOSShowInDock;
|
||||
_config.GuiItem.AutoUpdateInterval = AutoUpdateInterval;
|
||||
_config.UiItem.EnableDragDropSort = EnableDragDropSort;
|
||||
_config.UiItem.DoubleClick2Activate = DoubleClick2Activate;
|
||||
|
|
|
|||
|
|
@ -463,6 +463,21 @@
|
|||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding BlIsLinux}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsHide2TrayWhenCloseTip}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="10"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding BlIsIsMacOS}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsMacOSShowInDock}" />
|
||||
<ToggleSwitch
|
||||
x:Name="togMacOSShowInDock"
|
||||
Grid.Row="10"
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left"
|
||||
IsVisible="{Binding BlIsIsMacOS}"/>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="11"
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
|||
this.Bind(ViewModel, vm => vm.EnableUpdateSubOnlyRemarksExist, v => v.togEnableUpdateSubOnlyRemarksExist.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.AutoHideStartup, v => v.togAutoHideStartup.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.Hide2TrayWhenClose, v => v.togHide2TrayWhenClose.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.MacOSShowInDock, v => v.togMacOSShowInDock.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.AutoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CurrentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
|
||||
|
|
|
|||
Loading…
Reference in a new issue