禁用字体hinting渲染

This commit is contained in:
Scott0902 2024-09-21 23:56:15 +08:00
parent 243dbab06a
commit 4ea80fb54f
11 changed files with 121 additions and 87 deletions

View file

@ -1,14 +1,14 @@
<reactiveui:ReactiveWindow
x:Class="v2rayN.Views.AddServer2Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="v2rayN"
Width="700"
Height="500"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">

View file

@ -1,14 +1,14 @@
<reactiveui:ReactiveWindow
x:Class="v2rayN.Views.AddServerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuServers}"
Width="900"
Height="700"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
@ -179,6 +180,7 @@
Grid.Row="1"
Grid.Column="2"
Margin="4,0"
Click="btnGUID_Click"
Content="{x:Static resx:ResUI.TbGUID}"
Style="{StaticResource DefButton}" />
@ -338,6 +340,7 @@
Grid.Row="1"
Grid.Column="2"
Margin="4,0"
Click="btnGUID_Click"
Content="{x:Static resx:ResUI.TbGUID}"
Style="{StaticResource DefButton}" />

View file

@ -7,8 +7,8 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuDNSSetting}"
Width="1000"
Height="700"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">

View file

@ -7,8 +7,8 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuSetting}"
Width="700"
Height="500"
@ -20,8 +20,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">
@ -34,11 +35,13 @@
x:Name="btnReset"
Width="100"
Margin="8,0"
Click="btnReset_Click"
Content="{x:Static resx:ResUI.TbReset}"
Style="{StaticResource DefButton}" />
<Button
x:Name="btnSave"
Width="100"
Click="btnSave_Click"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
Style="{StaticResource DefButton}" />

View file

@ -7,9 +7,9 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:tb="clr-namespace:H.NotifyIcon;assembly=H.NotifyIcon.Wpf"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="v2rayN"
Width="900"
Height="700"
@ -20,8 +20,9 @@
ShowInTaskbar="True"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
@ -57,14 +58,6 @@
<TextBlock Text="{x:Static resx:ResUI.menuServers}" />
</StackPanel>
</MenuItem.Header>
<MenuItem
x:Name="menuAddServerViaClipboard"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuAddServerViaClipboard}" />
<MenuItem
x:Name="menuAddServerViaScan"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuAddServerViaScan}" />
<MenuItem
x:Name="menuAddCustomServer"
Height="{StaticResource MenuItemHeight}"
@ -107,6 +100,15 @@
x:Name="menuAddWireguardServer"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuAddWireguardServer}" />
<Separator Margin="-40,5" />
<MenuItem
x:Name="menuAddServerViaClipboard"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuAddServerViaClipboard}" />
<MenuItem
x:Name="menuAddServerViaScan"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuAddServerViaScan}" />
</MenuItem>
</Menu>
<Separator />
@ -180,20 +182,21 @@
<MenuItem
x:Name="menuSettingsSetUWP"
Height="{StaticResource MenuItemHeight}"
Click="menuSettingsSetUWP_Click"
Header="{x:Static resx:ResUI.TbSettingsSetUWP}" />
<MenuItem
x:Name="menuClearServerStatistics"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuClearServerStatistics}" />
<Separator Margin="-40,5" />
<MenuItem
x:Name="menuBackupAndRestore"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuBackupAndRestore}" />
<MenuItem
x:Name="menuOpenTheFileLocation"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuOpenTheFileLocation}" />
<!--<MenuItem
x:Name="menuImportOldGuiConfig"
Height="{StaticResource MenuItemHeight}"
Header="{x:Static resx:ResUI.menuImportOldGuiConfig}" />-->
</MenuItem>
</Menu>
<Separator />
@ -212,7 +215,7 @@
</Menu>
<Separator />
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
<MenuItem Name="menuCheckUpdate" Padding="8,0">
<MenuItem Padding="8,0">
<MenuItem.Header>
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon
@ -222,6 +225,27 @@
<TextBlock Text="{x:Static resx:ResUI.menuCheckUpdate}" />
</StackPanel>
</MenuItem.Header>
<MenuItem
x:Name="menuCheckUpdateN"
Height="{StaticResource MenuItemHeight}"
Header="V2rayN" />
<MenuItem
x:Name="menuCheckUpdateXrayCore"
Height="{StaticResource MenuItemHeight}"
Header="Xray Core" />
<MenuItem
x:Name="menuCheckUpdateMihomoCore"
Height="{StaticResource MenuItemHeight}"
Header="Mihomo Core" />
<MenuItem
x:Name="menuCheckUpdateSingBoxCore"
Height="{StaticResource MenuItemHeight}"
Header="Sing-box Core" />
<Separator Margin="-40,5" />
<MenuItem
x:Name="menuCheckUpdateGeo"
Height="{StaticResource MenuItemHeight}"
Header="Geo files" />
</MenuItem>
</Menu>
<Separator />
@ -240,7 +264,10 @@
</Menu>
<Separator />
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
<MenuItem x:Name="menuPromotion" Padding="8,0">
<MenuItem
x:Name="menuPromotion"
Padding="8,0"
Click="menuPromotion_Click">
<MenuItem.Header>
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon
@ -254,7 +281,10 @@
</Menu>
<Separator />
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
<MenuItem x:Name="menuClose" Padding="8,0">
<MenuItem
x:Name="menuClose"
Padding="8,0"
Click="menuClose_Click">
<MenuItem.Header>
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon
@ -609,6 +639,7 @@
<MenuItem
x:Name="menuExit"
Height="{StaticResource MenuItemHeight}"
Click="menuExit_Click"
Header="{x:Static resx:ResUI.menuExit}" />
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>

View file

@ -7,8 +7,8 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuSetting}"
Width="1000"
Height="700"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel Margin="8">

View file

@ -6,9 +6,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuRoutingRuleDetailsSetting}"
Width="900"
Height="700"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel>

View file

@ -6,9 +6,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuRoutingRuleSetting}"
Width="960"
Height="700"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<DockPanel>
@ -213,6 +214,7 @@
Grid.Row="3"
Grid.Column="2"
Margin="2,0,8,0"
Click="btnBrowseCustomIcon_Click"
Content="{x:Static resx:ResUI.TbBrowse}"
Style="{StaticResource DefButton}" />
@ -242,6 +244,7 @@
Grid.Row="4"
Grid.Column="2"
Margin="2,0,8,0"
Click="btnBrowseCustomRulesetPath4Singbox_Click"
Content="{x:Static resx:ResUI.TbBrowse}"
Style="{StaticResource DefButton}" />
</Grid>
@ -273,6 +276,7 @@
<MenuItem
x:Name="menuRuleSelectAll"
Height="{StaticResource MenuItemHeight}"
Click="menuRuleSelectAll_Click"
Header="{x:Static resx:ResUI.menuSelectAll}" />
<MenuItem
x:Name="menuRuleExportSelected"

View file

@ -7,8 +7,8 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuRoutingSetting}"
Width="990"
Height="700"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
@ -148,6 +149,7 @@
x:Name="btnCancel"
Width="100"
Margin="8,0"
Click="btnCancel_Click"
Content="{x:Static resx:ResUI.TbCancel}"
Cursor="Hand"
IsCancel="true"
@ -183,6 +185,7 @@
<MenuItem
x:Name="menuRoutingAdvancedSelectAll"
Height="{StaticResource MenuItemHeight}"
Click="menuRoutingAdvancedSelectAll_Click"
Header="{x:Static resx:ResUI.menuSelectAll}" />
<MenuItem
x:Name="menuRoutingAdvancedSetDefault"

View file

@ -6,9 +6,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuSubSetting}"
Width="700"
Height="600"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
@ -69,7 +70,6 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -282,24 +282,6 @@
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvPrevProfileTip}"
AcceptsReturn="True"
Style="{StaticResource MyOutlinedTextBox}" />
<TextBlock
Grid.Row="11"
Grid.Column="0"
Margin="4"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbPreSocksPort4Sub}" />
<TextBox
x:Name="txtPreSocksPort"
Grid.Row="11"
Grid.Column="1"
Margin="4"
HorizontalAlignment="Left"
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TipPreSocksPort}"
AcceptsReturn="True"
Style="{StaticResource MyOutlinedTextBox}"
ToolTip="{x:Static resx:ResUI.TipPreSocksPort}" />
</Grid>
</ScrollViewer>
</DockPanel>

View file

@ -7,8 +7,8 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuSubSetting}"
Width="800"
Height="600"
@ -19,8 +19,9 @@
ShowInTaskbar="False"
TextElement.FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="Auto"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="ClearType"
TextOptions.TextHintingMode="Fixed"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<materialDesign:DialogHost
@ -73,7 +74,10 @@
<TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.menuSubShare}" />
</StackPanel>
</Button>
<Button x:Name="menuClose" IsCancel="True">
<Button
x:Name="menuClose"
Click="menuClose_Click"
IsCancel="True">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon
Margin="0,0,8,0"