Skip to content

Commit 3bf2dc7

Browse files
committedOct 22, 2024
Improved fontsize
1 parent 5a78361 commit 3bf2dc7

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed
 

‎v2rayN/v2rayN/App.xaml

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Application
22
x:Class="v2rayN.App"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4-
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
54
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
65
xmlns:conv="clr-namespace:v2rayN.Converters"
6+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
77
ShutdownMode="OnExplicitShutdown"
88
StartupUri="Views/MainWindow.xaml">
99
<Application.Resources>
@@ -18,8 +18,6 @@
1818
<system:Double x:Key="MenuItemHeight">26</system:Double>
1919
<system:Double x:Key="StdFontSize">12</system:Double>
2020
<system:Double x:Key="StdFontSize1">13</system:Double>
21-
<system:Double x:Key="StdFontSize2">14</system:Double>
22-
<system:Double x:Key="StdFontSizeMsg">11</system:Double>
2321
<system:Double x:Key="StdFontSize-1">11</system:Double>
2422

2523
<conv:InverseBooleanConverter x:Key="InverseBooleanConverter" />
@@ -69,7 +67,7 @@
6967
x:Key="ModuleTitle"
7068
BasedOn="{StaticResource MaterialDesignTextBlock}"
7169
TargetType="{x:Type TextBlock}">
72-
<Setter Property="FontSize" Value="{DynamicResource StdFontSize2}" />
70+
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
7371
</Style>
7472
<Style
7573
x:Key="ToolbarTextBlock"
@@ -121,21 +119,21 @@
121119
x:Key="DefButton"
122120
BasedOn="{StaticResource MaterialDesignRaisedButton}"
123121
TargetType="{x:Type ButtonBase}">
124-
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
122+
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
125123
</Style>
126124
<Style
127125
x:Key="DefContextMenu"
128126
BasedOn="{StaticResource MaterialDesignContextMenu}"
129127
TargetType="{x:Type ContextMenu}">
130-
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
128+
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
131129
<Setter Property="FontFamily" Value="{x:Static conv:MaterialDesignFonts.MyFont}" />
132130
</Style>
133131

134132
<Style
135133
x:Key="ToolbarMenu"
136134
BasedOn="{StaticResource MaterialDesignMenu}"
137135
TargetType="{x:Type Menu}">
138-
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
136+
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
139137
<Setter Property="FontFamily" Value="{x:Static conv:MaterialDesignFonts.MyFont}" />
140138
</Style>
141139

@@ -185,13 +183,13 @@
185183
<Setter Property="Padding" Value="{StaticResource OutlinedTextBoxDefaultPadding}" />
186184
</Style>
187185
<Style x:Key="ListItemChip" TargetType="{x:Type materialDesign:Chip}">
188-
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
186+
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
189187
</Style>
190188
<Style
191189
x:Key="ListItemTitle"
192190
BasedOn="{StaticResource MaterialDesignTextBlock}"
193191
TargetType="{x:Type TextBlock}">
194-
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
192+
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
195193
</Style>
196194
<Style
197195
x:Key="ListItemSubTitle"

‎v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs

-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ private void BindingUI()
142142
double size = (long)CurrentFontSize;
143143
Application.Current.Resources["StdFontSize"] = size;
144144
Application.Current.Resources["StdFontSize1"] = size + 1;
145-
Application.Current.Resources["StdFontSize2"] = size + 2;
146-
Application.Current.Resources["StdFontSizeMsg"] = size - 1;
147145
Application.Current.Resources["StdFontSize-1"] = size - 1;
148146

149147
ConfigHandler.SaveConfig(_config);

‎v2rayN/v2rayN/Views/MsgView.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<TextBox
7171
Name="txtMsg"
7272
BorderThickness="0"
73-
FontSize="{DynamicResource StdFontSizeMsg}"
73+
FontSize="{DynamicResource StdFontSize-1}"
7474
HorizontalScrollBarVisibility="Auto"
7575
IsReadOnly="True"
7676
IsReadOnlyCaretVisible="True"

0 commit comments

Comments
 (0)
Please sign in to comment.