mirror of https://github.com/2dust/v2rayN
Improved fontsize
parent
5a7836115e
commit
3bf2dc711d
|
@ -1,9 +1,9 @@
|
||||||
<Application
|
<Application
|
||||||
x:Class="v2rayN.App"
|
x:Class="v2rayN.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
ShutdownMode="OnExplicitShutdown"
|
ShutdownMode="OnExplicitShutdown"
|
||||||
StartupUri="Views/MainWindow.xaml">
|
StartupUri="Views/MainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
@ -18,8 +18,6 @@
|
||||||
<system:Double x:Key="MenuItemHeight">26</system:Double>
|
<system:Double x:Key="MenuItemHeight">26</system:Double>
|
||||||
<system:Double x:Key="StdFontSize">12</system:Double>
|
<system:Double x:Key="StdFontSize">12</system:Double>
|
||||||
<system:Double x:Key="StdFontSize1">13</system:Double>
|
<system:Double x:Key="StdFontSize1">13</system:Double>
|
||||||
<system:Double x:Key="StdFontSize2">14</system:Double>
|
|
||||||
<system:Double x:Key="StdFontSizeMsg">11</system:Double>
|
|
||||||
<system:Double x:Key="StdFontSize-1">11</system:Double>
|
<system:Double x:Key="StdFontSize-1">11</system:Double>
|
||||||
|
|
||||||
<conv:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
<conv:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
||||||
|
@ -69,7 +67,7 @@
|
||||||
x:Key="ModuleTitle"
|
x:Key="ModuleTitle"
|
||||||
BasedOn="{StaticResource MaterialDesignTextBlock}"
|
BasedOn="{StaticResource MaterialDesignTextBlock}"
|
||||||
TargetType="{x:Type TextBlock}">
|
TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize2}" />
|
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="ToolbarTextBlock"
|
x:Key="ToolbarTextBlock"
|
||||||
|
@ -121,13 +119,13 @@
|
||||||
x:Key="DefButton"
|
x:Key="DefButton"
|
||||||
BasedOn="{StaticResource MaterialDesignRaisedButton}"
|
BasedOn="{StaticResource MaterialDesignRaisedButton}"
|
||||||
TargetType="{x:Type ButtonBase}">
|
TargetType="{x:Type ButtonBase}">
|
||||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
|
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="DefContextMenu"
|
x:Key="DefContextMenu"
|
||||||
BasedOn="{StaticResource MaterialDesignContextMenu}"
|
BasedOn="{StaticResource MaterialDesignContextMenu}"
|
||||||
TargetType="{x:Type ContextMenu}">
|
TargetType="{x:Type ContextMenu}">
|
||||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
|
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||||
<Setter Property="FontFamily" Value="{x:Static conv:MaterialDesignFonts.MyFont}" />
|
<Setter Property="FontFamily" Value="{x:Static conv:MaterialDesignFonts.MyFont}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
@ -135,7 +133,7 @@
|
||||||
x:Key="ToolbarMenu"
|
x:Key="ToolbarMenu"
|
||||||
BasedOn="{StaticResource MaterialDesignMenu}"
|
BasedOn="{StaticResource MaterialDesignMenu}"
|
||||||
TargetType="{x:Type Menu}">
|
TargetType="{x:Type Menu}">
|
||||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
|
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||||
<Setter Property="FontFamily" Value="{x:Static conv:MaterialDesignFonts.MyFont}" />
|
<Setter Property="FontFamily" Value="{x:Static conv:MaterialDesignFonts.MyFont}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
@ -185,13 +183,13 @@
|
||||||
<Setter Property="Padding" Value="{StaticResource OutlinedTextBoxDefaultPadding}" />
|
<Setter Property="Padding" Value="{StaticResource OutlinedTextBoxDefaultPadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="ListItemChip" TargetType="{x:Type materialDesign:Chip}">
|
<Style x:Key="ListItemChip" TargetType="{x:Type materialDesign:Chip}">
|
||||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
|
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="ListItemTitle"
|
x:Key="ListItemTitle"
|
||||||
BasedOn="{StaticResource MaterialDesignTextBlock}"
|
BasedOn="{StaticResource MaterialDesignTextBlock}"
|
||||||
TargetType="{x:Type TextBlock}">
|
TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="FontSize" Value="{DynamicResource StdFontSize1}" />
|
<Setter Property="FontSize" Value="{DynamicResource StdFontSize}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style
|
<Style
|
||||||
x:Key="ListItemSubTitle"
|
x:Key="ListItemSubTitle"
|
||||||
|
|
|
@ -142,8 +142,6 @@ namespace v2rayN.ViewModels
|
||||||
double size = (long)CurrentFontSize;
|
double size = (long)CurrentFontSize;
|
||||||
Application.Current.Resources["StdFontSize"] = size;
|
Application.Current.Resources["StdFontSize"] = size;
|
||||||
Application.Current.Resources["StdFontSize1"] = size + 1;
|
Application.Current.Resources["StdFontSize1"] = size + 1;
|
||||||
Application.Current.Resources["StdFontSize2"] = size + 2;
|
|
||||||
Application.Current.Resources["StdFontSizeMsg"] = size - 1;
|
|
||||||
Application.Current.Resources["StdFontSize-1"] = size - 1;
|
Application.Current.Resources["StdFontSize-1"] = size - 1;
|
||||||
|
|
||||||
ConfigHandler.SaveConfig(_config);
|
ConfigHandler.SaveConfig(_config);
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="txtMsg"
|
Name="txtMsg"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
FontSize="{DynamicResource StdFontSizeMsg}"
|
FontSize="{DynamicResource StdFontSize-1}"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
IsReadOnlyCaretVisible="True"
|
IsReadOnlyCaretVisible="True"
|
||||||
|
|
Loading…
Reference in New Issue