Browse Source

Use description for DocumentTransformMode

CPKreuz 2 years ago
parent
commit
92e3e8237f

+ 7 - 2
src/PixiEditor/Models/Enums/DocumentTransformMode.cs

@@ -1,9 +1,14 @@
-namespace PixiEditor.Models.Enums;
+using System.ComponentModel;
+
+namespace PixiEditor.Models.Enums;
 internal enum DocumentTransformMode
 internal enum DocumentTransformMode
 {
 {
-    // Localization dependent on names!
+    [Description("SCALE_NOROTATE_NOSHEAR_NOPERSPECTIVE")]
     Scale_NoRotate_NoShear_NoPerspective,
     Scale_NoRotate_NoShear_NoPerspective,
+    [Description("SCALE_ROTATE_NOSHEAR_NOPERSPECTIVE")]
     Scale_Rotate_NoShear_NoPerspective,
     Scale_Rotate_NoShear_NoPerspective,
+    [Description("SCALE_ROTATE_SHEAR_NOPERSPECTIVE")]
     Scale_Rotate_Shear_NoPerspective,
     Scale_Rotate_Shear_NoPerspective,
+    [Description("SCALE_ROTATE_SHEAR_PERSPECTIVE")]
     Scale_Rotate_Shear_Perspective
     Scale_Rotate_Shear_Perspective
 }
 }

+ 1 - 1
src/PixiEditor/ViewModels/SubViewModels/Document/TransformOverlays/DocumentTransformViewModel.cs

@@ -62,7 +62,7 @@ internal class DocumentTransformViewModel : NotifyableObject
 
 
             if (value)
             if (value)
             {
             {
-                document.ActionDisplays[nameof(DocumentTransformViewModel)] = new LocalizedString($"TRANSFORM_ACTION_DISPLAY_{activeTransformMode.ToString().ToUpper()}");
+                document.ActionDisplays[nameof(DocumentTransformViewModel)] = new LocalizedString($"TRANSFORM_ACTION_DISPLAY_{activeTransformMode.GetDescription()}");
             }
             }
             else
             else
             {
             {