Added Layer menu

This commit is contained in:
Krzysztof Krysiński 2025-06-01 16:44:56 +02:00
parent 15b8f543ce
commit 066b281289
3 changed files with 11 additions and 6 deletions

View File

@ -50,9 +50,10 @@ internal class MenuBarViewModel : PixiObservableObject
{ "FILE", 100 },
{ "EDIT", 200 },
{ "SELECT", 300 },
{ "IMAGE", 400 },
{ "VIEW", 500 },
{ "HELP", 600 },
{ "LAYER", 400 },
{ "IMAGE", 500 },
{ "VIEW", 600 },
{ "HELP", 700 },
{ "DEBUG", 1000 },
};

View File

@ -548,7 +548,8 @@ internal class LayersViewModel : SubViewModel<ViewModelMain>
}
[Command.Basic("PixiEditor.Layer.Rasterize", "RASTERIZE_ACTIVE_LAYER", "RASTERIZE_ACTIVE_LAYER_DESCRIPTIVE",
CanExecute = "PixiEditor.Layer.SelectedLayerIsRasterizable")]
CanExecute = "PixiEditor.Layer.SelectedLayerIsRasterizable",
Icon = PixiPerfectIcons.LowResCircle, MenuItemPath = "LAYER/VECTOR/RASTERIZE_ACTIVE_LAYER", AnalyticsTrack = true)]
public void RasterizeActiveLayer()
{
var doc = Owner.DocumentManagerSubViewModel.ActiveDocument;
@ -560,7 +561,8 @@ internal class LayersViewModel : SubViewModel<ViewModelMain>
}
[Command.Basic("PixiEditor.Layer.ConvertToCurve", "CONVERT_TO_CURVE", "CONVERT_TO_CURVE_DESCRIPTIVE",
CanExecute = "PixiEditor.Layer.SelectedMemberIsVectorLayer")]
CanExecute = "PixiEditor.Layer.SelectedMemberIsVectorLayer",
MenuItemPath = "LAYER/VECTOR/CONVERT_TO_CURVE", AnalyticsTrack = true)]
public void ConvertActiveLayerToCurve()
{
var doc = Owner.DocumentManagerSubViewModel.ActiveDocument;
@ -572,7 +574,8 @@ internal class LayersViewModel : SubViewModel<ViewModelMain>
}
[Command.Basic("PixiEditor.Layer.SeparateShapes", "SEPARATE_SHAPES", "SEPARATE_SHAPES_DESCRIPTIVE",
CanExecute = "PixiEditor.Layer.SelectedMemberIsVectorLayer")]
CanExecute = "PixiEditor.Layer.SelectedMemberIsVectorLayer",
MenuItemPath = "LAYER/VECTOR/SEPARATE_SHAPES", AnalyticsTrack = true)]
public void SeparateShapes()
{
var doc = Owner.DocumentManagerSubViewModel.ActiveDocument;

View File

@ -202,6 +202,7 @@
<Separator />
<MenuItem ui:Translator.Key="RASTERIZE" Command="{xaml:Command PixiEditor.Layer.Rasterize}" />
<MenuItem ui:Translator.Key="CONVERT_TO_CURVE" Command="{xaml:Command PixiEditor.Layer.ConvertToCurve}" />
<MenuItem ui:Translator.Key="SEPARATE_SHAPES" Command="{xaml:Command PixiEditor.Layer.SeparateShapes}" />
</ContextMenu>
</Border.ContextMenu>
</Border>