Parcourir la source

Made Shortcut opinionated based on Orientation

Tig il y a 1 an
Parent
commit
b6d9e6c14d
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 1
      Terminal.Gui/Views/Shortcut.cs
  2. 0 1
      UICatalog/Scenarios/Shortcuts.cs

+ 2 - 1
Terminal.Gui/Views/Shortcut.cs

@@ -168,7 +168,8 @@ public class Shortcut : View
         }
     }
 
-    private AlignmentModes _alignmentModes = AlignmentModes.StartToEnd | AlignmentModes.IgnoreFirstOrLast;
+    // The default Orientation is Horizontal thus set this to EndToStart
+    private AlignmentModes _alignmentModes = AlignmentModes.EndToStart | AlignmentModes.IgnoreFirstOrLast;
 
     /// <summary>
     ///     Gets or sets the <see cref="AlignmentModes"/> for this <see cref="Shortcut"/>.

+ 0 - 1
UICatalog/Scenarios/Shortcuts.cs

@@ -226,7 +226,6 @@ public class Shortcuts : Scenario
         // Horizontal
         var hShortcut1 = new Shortcut
         {
-            Orientation = Orientation.Horizontal,
             X = Pos.Align (Alignment.Start, AlignmentModes.IgnoreFirstOrLast, 1),
             Y = Pos.Bottom (eventLog) + 1,
             Key = Key.F7,