perf: update all png by iconfont

dev_deconstruction
DESKTOP-3BO4HSG\ksat 2 years ago
parent 948876bc1c
commit 27ffc11026

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

@ -37,8 +37,8 @@
<Button x:Name="TopmostBtn"
Template="{DynamicResource ButtonTemplateUnTopmost}"
Click="Top_Click"/>
<Button Template="{DynamicResource ButtonTemplate}"
Width="30"
<Button Width="auto"
Template="{DynamicResource ButtonTemplateTheme}"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="0,0,100,0"

@ -61,82 +61,12 @@ namespace STranslate.Properties {
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_default {
internal static byte[] iconfont {
get {
object obj = ResourceManager.GetObject("copy_default", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_large_hump {
get {
object obj = ResourceManager.GetObject("copy_large_hump", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_small_hump {
get {
object obj = ResourceManager.GetObject("copy_small_hump", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap copy_snake {
get {
object obj = ResourceManager.GetObject("copy_snake", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon crossword {
get {
object obj = ResourceManager.GetObject("crossword", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon input {
get {
object obj = ResourceManager.GetObject("input", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon screenshot {
get {
object obj = ResourceManager.GetObject("screenshot", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap topmost {
get {
object obj = ResourceManager.GetObject("topmost", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
object obj = ResourceManager.GetObject("iconfont", resourceCulture);
return ((byte[])(obj));
}
}
@ -149,25 +79,5 @@ namespace STranslate.Properties {
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap untopmost {
get {
object obj = ResourceManager.GetObject("untopmost", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon window {
get {
object obj = ResourceManager.GetObject("window", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

@ -118,37 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="copy_default" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_default.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="copy_large_hump" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_large_hump.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="copy_small_hump" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_small_hump.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="copy_snake" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\copy_snake.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="crossword" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\crossword.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="input" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\input.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="screenshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\screenshot.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="topmost" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\topmost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="iconfont" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\iconfont.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="translate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\translate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="untopmost" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\button_default\untopmost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\tray\window.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

@ -165,39 +165,9 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Resource Include="Images\Tray\crossword.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Tray\input.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Tray\screenshot.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Tray\window.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\untopmost.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\topmost.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\translate.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_default.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_small_hump.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_large_hump.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Images\Button_Default\copy_snake.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />

@ -1,5 +1,37 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>
</Style>
<!--主题切换-->
<ControlTemplate x:Key="ButtonTemplateTheme"
TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="5"
HorizontalAlignment="Left"
Margin="8,5,0,0"
Width="30"
Height="30">
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe994;"
Foreground="WhiteSmoke"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="#47484c"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="#35333c"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--置顶-->
<ControlTemplate x:Key="ButtonTemplateTopmost"
TargetType="Button">
<Border x:Name="border"
@ -8,8 +40,11 @@
HorizontalAlignment="Left"
Margin="8,5,0,0"
MaxHeight="30">
<Image Height="20"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/topmost.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="21"
VerticalAlignment="Center"
Text="&#xe637;"
Foreground="#3478f6"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -20,6 +55,8 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--取消置顶-->
<ControlTemplate x:Key="ButtonTemplateUnTopmost"
TargetType="Button">
<Border x:Name="border"
@ -28,8 +65,11 @@
HorizontalAlignment="Left"
Margin="8,5,0,0"
MaxHeight="30">
<Image Height="20"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/untopmost.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="22"
VerticalAlignment="Center"
Text="&#xe9ba;"
Foreground="WhiteSmoke"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -40,12 +80,18 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--普通复制-->
<ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_default.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe692;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -57,12 +103,17 @@
</ControlTemplate.Triggers>
</ControlTemplate>
<!--蛇形复制-->
<ControlTemplate x:Key="ButtonTemplateSnakeCopy" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_snake.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe602;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -74,12 +125,17 @@
</ControlTemplate.Triggers>
</ControlTemplate>
<!--小驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateSmallHumpCopy" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_small_hump.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe603;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -91,12 +147,17 @@
</ControlTemplate.Triggers>
</ControlTemplate>
<!--大驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateLargeHumpCopy" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_large_hump.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe601;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">

@ -1,6 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>

@ -25,7 +25,7 @@
<!--光标颜色-->
<Setter Property="CaretBrush" Value="WhiteSmoke"/>
<!--选区颜色-->
<Setter Property="SelectionBrush" Value="#2d445c"/>
<Setter Property="SelectionBrush" Value="#404856"/>
<Setter Property="Margin" Value="10,10,5,35"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="MinHeight" Value="70"/>

@ -1,5 +1,9 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>
</Style>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/STranslate;component/Style/Default/DictionaryButtonDefault.xaml"/>

@ -1,5 +1,37 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--引入字体文件-->
<Style x:Key="IconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/STranslate;component/Images/#iconfont"/>
</Style>
<!--主题切换-->
<ControlTemplate x:Key="ButtonTemplateTheme"
TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="5"
HorizontalAlignment="Left"
Margin="8,5,0,0"
Width="30"
Height="30">
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe994;"
Foreground="#787a7f"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="#eaeaea"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="#dddddd"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--置顶-->
<ControlTemplate x:Key="ButtonTemplateTopmost"
TargetType="Button">
<Border x:Name="border"
@ -7,9 +39,12 @@
Padding="5"
HorizontalAlignment="Left"
Margin="8,5,0,0"
MaxHeight="30">
<Image Height="20"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/topmost.png"/>
Height="30">
<TextBlock Style="{StaticResource IconStyle}"
FontSize="21"
VerticalAlignment="Center"
Text="&#xe637;"
Foreground="#3478f6"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -20,6 +55,8 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--取消置顶-->
<ControlTemplate x:Key="ButtonTemplateUnTopmost"
TargetType="Button">
<Border x:Name="border"
@ -28,8 +65,11 @@
HorizontalAlignment="Left"
Margin="8,5,0,0"
MaxHeight="30">
<Image Height="20"
Source="pack://application:,,,/STranslate;component/Images/Button_Default/untopmost.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="22"
VerticalAlignment="Center"
Text="&#xe9ba;"
Foreground="#787a7f"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -40,12 +80,18 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!--普通复制-->
<ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_default.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe692;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -57,12 +103,17 @@
</ControlTemplate.Triggers>
</ControlTemplate>
<!--蛇形复制-->
<ControlTemplate x:Key="ButtonTemplateSnakeCopy" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_snake.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe602;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -74,12 +125,17 @@
</ControlTemplate.Triggers>
</ControlTemplate>
<!--小驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateSmallHumpCopy" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_small_hump.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe603;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
@ -91,12 +147,17 @@
</ControlTemplate.Triggers>
</ControlTemplate>
<!--大驼峰复制-->
<ControlTemplate x:Key="ButtonTemplateLargeHumpCopy" TargetType="Button">
<Border x:Name="border"
CornerRadius="5"
Padding="4"
MaxHeight="25">
<Image Source="pack://application:,,,/STranslate;component/Images/Button_Default/copy_large_hump.png"/>
<TextBlock Style="{StaticResource IconStyle}"
FontSize="18"
VerticalAlignment="Center"
Text="&#xe601;"
Foreground="#515151"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">

@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using System.Windows.Media;
namespace STranslate.ViewModel
{
@ -48,7 +49,9 @@ namespace STranslate.ViewModel
{
Clipboard.SetText(LargeHumpRet);
});
ThemeConvertCmd = new RelayCommand((_) => true, (_) =>
//主题切换
ThemeConvertCmd = new RelayCommand((_) => true, (o) =>
{
Application.Current.Resources.MergedDictionaries[0].Source =
Application.Current.Resources.MergedDictionaries[0].Source

Loading…
Cancel
Save