From b6d9e6c14db3f0b6ea0bbef4d7e25cb00df31f38 Mon Sep 17 00:00:00 2001 From: Tig Date: Mon, 17 Jun 2024 09:13:06 -0700 Subject: [PATCH] Made Shortcut opinionated based on Orientation --- Terminal.Gui/Views/Shortcut.cs | 3 ++- UICatalog/Scenarios/Shortcuts.cs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/Views/Shortcut.cs b/Terminal.Gui/Views/Shortcut.cs index 78250cf15..af7c84c21 100644 --- a/Terminal.Gui/Views/Shortcut.cs +++ b/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; /// /// Gets or sets the for this . diff --git a/UICatalog/Scenarios/Shortcuts.cs b/UICatalog/Scenarios/Shortcuts.cs index 8ba6551f8..05c7b6b26 100644 --- a/UICatalog/Scenarios/Shortcuts.cs +++ b/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,