Browse Source

Added new icons

flabbet 8 months ago
parent
commit
8f33c41a48

BIN
src/PixiEditor.UI.Common/Fonts/pixiperfect.ttf → src/PixiEditor.UI.Common/Fonts/PixiPerfect.ttf


+ 5 - 2
src/PixiEditor.UI.Common/Fonts/PixiPerfectIcons.axaml

@@ -3,7 +3,7 @@
                     xmlns:system="clr-namespace:System;assembly=System.Runtime">
     <Styles.Resources>
         <ResourceDictionary>
-            <FontFamily x:Key="PixiPerfectIcons">avares://PixiEditor.UI.Common/Fonts/pixiperfect.ttf#pixiperfect</FontFamily>
+            <FontFamily x:Key="PixiPerfectIcons">avares://PixiEditor.UI.Common/Fonts/PixiPerfect.ttf#PixiPerfect</FontFamily>
             
             <system:String x:Key="icon-add-reference">&#xE900;</system:String>
             <system:String x:Key="icon-add-to-mask">&#xE901;</system:String>
@@ -132,7 +132,10 @@
             <system:String x:Key="icon-nodes">&#xe984;</system:String>
             <system:String x:Key="icon-onion">&#xe985;</system:String>
             
-            <system:String x:Key="icon-snapping">&#xfffd;</system:String>
+            <system:String x:Key="icon-lowres-circle">&#xe986;</system:String>
+            <system:String x:Key="icon-snapping">&#xe987;</system:String>
+            <system:String x:Key="icon-lowres-square">&#xe988;</system:String>
+            <system:String x:Key="icon-lowres-line">&#xe989;</system:String>
         </ResourceDictionary>
     </Styles.Resources>
     

+ 6 - 3
src/PixiEditor.UI.Common/Fonts/PixiPerfectIcons.axaml.cs

@@ -10,7 +10,7 @@ namespace PixiEditor.UI.Common.Fonts;
 //TODO: Make autogenerated from PixiPerfectIcons.axaml
 public static class PixiPerfectIcons
 {
-    private static readonly FontFamily pixiPerfectFontFamily = new("avares://PixiEditor.UI.Common/Fonts/pixiperfect.ttf#pixiperfect");
+    private static readonly FontFamily pixiPerfectFontFamily = new("avares://PixiEditor.UI.Common/Fonts/PixiPerfect.ttf#PixiPerfect");
     
     public const string AddReference = "\ue900";
     public const string AddToMask = "\ue901";
@@ -131,10 +131,13 @@ public static class PixiPerfectIcons
     public const string ToggleLayerVisible = "\u25a1;"; // TODO: Create a toggle layer visible icon
     public const string ToggleMask = "\u25a1;"; // TODO: Create a toggle mask icon
     public static string Pen => "\uE971";
-    
+    public static string LowResCircle => "\uE986";
+    public static string LowResSquare => "\uE988";
+    public static string LowResLine => "\uE989";
+
     public static Stream GetFontStream()
     {
-        return AssetLoader.Open(new Uri("avares://PixiEditor.UI.Common/Fonts/pixiperfect.ttf"));
+        return AssetLoader.Open(new Uri("avares://PixiEditor.UI.Common/Fonts/PixiPerfect.ttf"));
     }
 
     public static IImage ToIcon(string unicode, double size = 18)

+ 1 - 0
src/PixiEditor.UI.Common/PixiEditor.UI.Common.csproj

@@ -11,6 +11,7 @@
       <AvaloniaResource Include="Fonts\pixiperfect.ttf" />
       <None Remove="Assets\Animations\LoadingIndicator.json" />
       <AvaloniaResource Include="Assets\Animations\LoadingIndicator.json" />
+      <AvaloniaResource Include="Fonts\PixiPerfect.ttf" />
     </ItemGroup>
 
     <ItemGroup>

+ 1 - 1
src/PixiEditor/ViewModels/Tools/Tools/RasterEllipseToolViewModel.cs

@@ -25,7 +25,7 @@ internal class RasterEllipseToolViewModel : ShapeTool, IRasterEllipseToolHandler
     public override LocalizedString Tooltip => new LocalizedString("ELLIPSE_TOOL_TOOLTIP", Shortcut);
     public bool DrawCircle { get; private set; }
 
-    public override string Icon => PixiPerfectIcons.Circle;
+    public override string Icon => PixiPerfectIcons.LowResCircle;
 
     public override Type LayerTypeToCreateOnEmptyUse { get; } = typeof(ImageLayerNode);
 

+ 1 - 1
src/PixiEditor/ViewModels/Tools/Tools/RasterLineToolViewModel.cs

@@ -27,7 +27,7 @@ internal class RasterLineToolViewModel : ShapeTool, ILineToolHandler
     public override LocalizedString Tooltip => new LocalizedString("LINE_TOOL_TOOLTIP", Shortcut);
 
     public override Type[]? SupportedLayerTypes { get; } = { typeof(IRasterLayerHandler) };
-    public override string Icon => PixiPerfectIcons.Line;
+    public override string Icon => PixiPerfectIcons.LowResLine;
 
     [Settings.Inherited] public int ToolSize => GetValue<int>();
 

+ 1 - 1
src/PixiEditor/ViewModels/Tools/Tools/RasterRectangleToolViewModel.cs

@@ -26,7 +26,7 @@ internal class RasterRectangleToolViewModel : ShapeTool, IRasterRectangleToolHan
     public bool Filled { get; set; } = false;
     public bool DrawSquare { get; private set; } = false;
 
-    public override string Icon => PixiPerfectIcons.Square;
+    public override string Icon => PixiPerfectIcons.LowResSquare;
 
     public override Type LayerTypeToCreateOnEmptyUse { get; } = typeof(ImageLayerNode);
 

+ 1 - 1
src/PixiEditor/Views/Main/ViewportControls/Viewport.axaml

@@ -91,7 +91,7 @@
                                           ui:Translator.TooltipKey="LOW_RES_PREVIEW"
                                           Classes="OverlayButton pixi-icon"
                                           BorderBrush="{DynamicResource ThemeBorderMidBrush}"
-                                          Content="{DynamicResource icon-circle}"
+                                          Content="{DynamicResource icon-lowres-circle}"
                                           IsChecked="{Binding !HighResPreview, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=viewportControls:Viewport}, Mode=TwoWay}"
                                           Cursor="Hand" />
                         </StackPanel>