|
@@ -10,6 +10,7 @@ using PixiEditor.AvaloniaUI.ViewModels.Tools.Tools;
|
|
using PixiEditor.AvaloniaUI.Views;
|
|
using PixiEditor.AvaloniaUI.Views;
|
|
using PixiEditor.AvaloniaUI.Views.Overlays.SymmetryOverlay;
|
|
using PixiEditor.AvaloniaUI.Views.Overlays.SymmetryOverlay;
|
|
using PixiEditor.ChangeableDocument.Enums;
|
|
using PixiEditor.ChangeableDocument.Enums;
|
|
|
|
+using PixiEditor.UI.Common.Fonts;
|
|
|
|
|
|
namespace PixiEditor.AvaloniaUI.ViewModels.Document;
|
|
namespace PixiEditor.AvaloniaUI.ViewModels.Document;
|
|
#nullable enable
|
|
#nullable enable
|
|
@@ -66,15 +67,15 @@ internal class DocumentManagerViewModel : SubViewModel<ViewModelMain>, IDocument
|
|
public void ClipCanvas() => ActiveDocument?.Operations.ClipCanvas();
|
|
public void ClipCanvas() => ActiveDocument?.Operations.ClipCanvas();
|
|
|
|
|
|
[Command.Basic("PixiEditor.Document.FlipImageHorizontal", FlipType.Horizontal, "FLIP_IMG_HORIZONTALLY", "FLIP_IMG_HORIZONTALLY", CanExecute = "PixiEditor.HasDocument",
|
|
[Command.Basic("PixiEditor.Document.FlipImageHorizontal", FlipType.Horizontal, "FLIP_IMG_HORIZONTALLY", "FLIP_IMG_HORIZONTALLY", CanExecute = "PixiEditor.HasDocument",
|
|
- MenuItemPath = "IMAGE/FLIP/FLIP_IMG_HORIZONTALLY", MenuItemOrder = 14)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/FLIP/FLIP_IMG_HORIZONTALLY", MenuItemOrder = 14, Icon = PixiPerfectIcons.XFlip)]
|
|
[Command.Basic("PixiEditor.Document.FlipImageVertical", FlipType.Vertical, "FLIP_IMG_VERTICALLY", "FLIP_IMG_VERTICALLY", CanExecute = "PixiEditor.HasDocument",
|
|
[Command.Basic("PixiEditor.Document.FlipImageVertical", FlipType.Vertical, "FLIP_IMG_VERTICALLY", "FLIP_IMG_VERTICALLY", CanExecute = "PixiEditor.HasDocument",
|
|
- MenuItemPath = "IMAGE/FLIP/FLIP_IMG_VERTICALLY", MenuItemOrder = 15)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/FLIP/FLIP_IMG_VERTICALLY", MenuItemOrder = 15, Icon = PixiPerfectIcons.YFlip)]
|
|
public void FlipImage(FlipType type) => ActiveDocument?.Operations.FlipImage(type);
|
|
public void FlipImage(FlipType type) => ActiveDocument?.Operations.FlipImage(type);
|
|
|
|
|
|
[Command.Basic("PixiEditor.Document.FlipLayersHorizontal", FlipType.Horizontal, "FLIP_LAYERS_HORIZONTALLY", "FLIP_LAYERS_HORIZONTALLY", CanExecute = "PixiEditor.HasDocument",
|
|
[Command.Basic("PixiEditor.Document.FlipLayersHorizontal", FlipType.Horizontal, "FLIP_LAYERS_HORIZONTALLY", "FLIP_LAYERS_HORIZONTALLY", CanExecute = "PixiEditor.HasDocument",
|
|
- MenuItemPath = "IMAGE/FLIP/FLIP_LAYERS_HORIZONTALLY", MenuItemOrder = 16)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/FLIP/FLIP_LAYERS_HORIZONTALLY", MenuItemOrder = 16, Icon = PixiPerfectIcons.XSelectedFlip)]
|
|
[Command.Basic("PixiEditor.Document.FlipLayersVertical", FlipType.Vertical, "FLIP_LAYERS_VERTICALLY", "FLIP_LAYERS_VERTICALLY", CanExecute = "PixiEditor.HasDocument",
|
|
[Command.Basic("PixiEditor.Document.FlipLayersVertical", FlipType.Vertical, "FLIP_LAYERS_VERTICALLY", "FLIP_LAYERS_VERTICALLY", CanExecute = "PixiEditor.HasDocument",
|
|
- MenuItemPath = "IMAGE/FLIP/FLIP_LAYERS_VERTICALLY", MenuItemOrder = 17)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/FLIP/FLIP_LAYERS_VERTICALLY", MenuItemOrder = 17, Icon = PixiPerfectIcons.YSelectedFlip)]
|
|
public void FlipLayers(FlipType type)
|
|
public void FlipLayers(FlipType type)
|
|
{
|
|
{
|
|
if (ActiveDocument?.SelectedStructureMember == null)
|
|
if (ActiveDocument?.SelectedStructureMember == null)
|
|
@@ -85,24 +86,24 @@ internal class DocumentManagerViewModel : SubViewModel<ViewModelMain>, IDocument
|
|
|
|
|
|
[Command.Basic("PixiEditor.Document.Rotate90Deg", "ROT_IMG_90",
|
|
[Command.Basic("PixiEditor.Document.Rotate90Deg", "ROT_IMG_90",
|
|
"ROT_IMG_90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D90,
|
|
"ROT_IMG_90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D90,
|
|
- MenuItemPath = "IMAGE/ROTATION/ROT_IMG_90_D", MenuItemOrder = 8)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/ROTATION/ROT_IMG_90_D", MenuItemOrder = 8, Icon = PixiPerfectIcons.RotateImage90)]
|
|
[Command.Basic("PixiEditor.Document.Rotate180Deg", "ROT_IMG_180",
|
|
[Command.Basic("PixiEditor.Document.Rotate180Deg", "ROT_IMG_180",
|
|
"ROT_IMG_180", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D180,
|
|
"ROT_IMG_180", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D180,
|
|
- MenuItemPath = "IMAGE/ROTATION/ROT_IMG_180_D", MenuItemOrder = 9)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/ROTATION/ROT_IMG_180_D", MenuItemOrder = 9, Icon = PixiPerfectIcons.RotateImage180)]
|
|
[Command.Basic("PixiEditor.Document.Rotate270Deg", "ROT_IMG_-90",
|
|
[Command.Basic("PixiEditor.Document.Rotate270Deg", "ROT_IMG_-90",
|
|
"ROT_IMG_-90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D270,
|
|
"ROT_IMG_-90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D270,
|
|
- MenuItemPath = "IMAGE/ROTATION/ROT_IMG_-90_D", MenuItemOrder = 10)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/ROTATION/ROT_IMG_-90_D", MenuItemOrder = 10, Icon = PixiPerfectIcons.RotateImageMinus90)]
|
|
public void RotateImage(RotationAngle angle) => ActiveDocument?.Operations.RotateImage(angle);
|
|
public void RotateImage(RotationAngle angle) => ActiveDocument?.Operations.RotateImage(angle);
|
|
|
|
|
|
[Command.Basic("PixiEditor.Document.Rotate90DegLayers", "ROT_LAYERS_90",
|
|
[Command.Basic("PixiEditor.Document.Rotate90DegLayers", "ROT_LAYERS_90",
|
|
"ROT_LAYERS_90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D90,
|
|
"ROT_LAYERS_90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D90,
|
|
- MenuItemPath = "IMAGE/ROTATION/ROT_LAYERS_90_D", MenuItemOrder = 11)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/ROTATION/ROT_LAYERS_90_D", MenuItemOrder = 11, Icon = PixiPerfectIcons.RotateFile90)]
|
|
[Command.Basic("PixiEditor.Document.Rotate180DegLayers", "ROT_LAYERS_180",
|
|
[Command.Basic("PixiEditor.Document.Rotate180DegLayers", "ROT_LAYERS_180",
|
|
"ROT_LAYERS_180", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D180,
|
|
"ROT_LAYERS_180", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D180,
|
|
- MenuItemPath = "IMAGE/ROTATION/ROT_LAYERS_180_D", MenuItemOrder = 12)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/ROTATION/ROT_LAYERS_180_D", MenuItemOrder = 12, Icon = PixiPerfectIcons.RotateFile180)]
|
|
[Command.Basic("PixiEditor.Document.Rotate270DegLayers", "ROT_LAYERS_-90",
|
|
[Command.Basic("PixiEditor.Document.Rotate270DegLayers", "ROT_LAYERS_-90",
|
|
"ROT_LAYERS_-90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D270,
|
|
"ROT_LAYERS_-90", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D270,
|
|
- MenuItemPath = "IMAGE/ROTATION/ROT_LAYERS_-90_D", MenuItemOrder = 13)]
|
|
|
|
|
|
+ MenuItemPath = "IMAGE/ROTATION/ROT_LAYERS_-90_D", MenuItemOrder = 13, Icon = PixiPerfectIcons.RotateFileMinus90)]
|
|
public void RotateLayers(RotationAngle angle)
|
|
public void RotateLayers(RotationAngle angle)
|
|
{
|
|
{
|
|
if (ActiveDocument?.SelectedStructureMember == null)
|
|
if (ActiveDocument?.SelectedStructureMember == null)
|