浏览代码

Justification->Alignment

Tig 1 年之前
父节点
当前提交
ce1e243df2
共有 54 个文件被更改,包括 551 次插入543 次删除
  1. 16 12
      Terminal.Gui/Drawing/Aligner.cs
  2. 2 2
      Terminal.Gui/Drawing/Thickness.cs
  3. 1 1
      Terminal.Gui/Resources/config.json
  4. 50 50
      Terminal.Gui/Text/TextFormatter.cs
  5. 47 41
      Terminal.Gui/View/Layout/PosDim.cs
  6. 11 11
      Terminal.Gui/View/ViewText.cs
  7. 2 2
      Terminal.Gui/Views/Button.cs
  8. 1 1
      Terminal.Gui/Views/CheckBox.cs
  9. 6 6
      Terminal.Gui/Views/Dialog.cs
  10. 1 1
      Terminal.Gui/Views/Menu/Menu.cs
  11. 4 4
      Terminal.Gui/Views/MessageBox.cs
  12. 1 1
      Terminal.Gui/Views/ProgressBar.cs
  13. 4 4
      Terminal.Gui/Views/Slider.cs
  14. 13 13
      Terminal.Gui/Views/TableView/ColumnStyle.cs
  15. 3 3
      Terminal.Gui/Views/TableView/TableView.cs
  16. 6 6
      Terminal.Gui/Views/TextValidateField.cs
  17. 1 1
      Terminal.Gui/Views/Wizard/Wizard.cs
  18. 2 2
      UICatalog/Scenarios/BasicColors.cs
  19. 26 26
      UICatalog/Scenarios/Buttons.cs
  20. 1 1
      UICatalog/Scenarios/CharacterMap.cs
  21. 2 2
      UICatalog/Scenarios/CollectionNavigatorTester.cs
  22. 2 2
      UICatalog/Scenarios/ColorPicker.cs
  23. 15 15
      UICatalog/Scenarios/ComputedLayout.cs
  24. 15 15
      UICatalog/Scenarios/CsvEditor.cs
  25. 9 9
      UICatalog/Scenarios/Dialogs.cs
  26. 2 2
      UICatalog/Scenarios/DynamicMenuBar.cs
  27. 9 9
      UICatalog/Scenarios/Editor.cs
  28. 1 1
      UICatalog/Scenarios/ListColumns.cs
  29. 9 9
      UICatalog/Scenarios/MessageBoxes.cs
  30. 2 2
      UICatalog/Scenarios/Mouse.cs
  31. 50 50
      UICatalog/Scenarios/PosAlign.cs
  32. 5 5
      UICatalog/Scenarios/TableEditor.cs
  33. 1 1
      UICatalog/Scenarios/Text.cs
  34. 52 52
      UICatalog/Scenarios/TextAlignmentAndDirection.cs
  35. 21 21
      UICatalog/Scenarios/TextFormatterDemo.cs
  36. 6 6
      UICatalog/Scenarios/TimeAndDate.cs
  37. 1 1
      UICatalog/Scenarios/Unicode.cs
  38. 5 5
      UICatalog/Scenarios/ViewExperiments.cs
  39. 4 4
      UICatalog/Scenarios/Wizards.cs
  40. 3 3
      UnitTests/Configuration/ThemeScopeTests.cs
  41. 2 2
      UnitTests/Configuration/ThemeTests.cs
  42. 16 16
      UnitTests/Dialogs/DialogTests.cs
  43. 59 59
      UnitTests/Text/TextFormatterTests.cs
  44. 3 3
      UnitTests/View/DrawTests.cs
  45. 6 6
      UnitTests/View/Layout/Dim.AutoTests.cs
  46. 8 8
      UnitTests/View/Text/AutoSizeTrueTests.cs
  47. 4 4
      UnitTests/Views/ButtonTests.cs
  48. 13 13
      UnitTests/Views/CheckBoxTests.cs
  49. 1 1
      UnitTests/Views/LabelTests.cs
  50. 20 20
      UnitTests/Views/TextValidateFieldTests.cs
  51. 2 2
      UnitTests/Views/ToplevelTests.cs
  52. 1 1
      docfx/docs/layout.md
  53. 3 5
      docfx/docs/migratingfromv1.md
  54. 1 1
      docfx/docs/newinv2.md

+ 16 - 12
Terminal.Gui/Drawing/Justification.cs → Terminal.Gui/Drawing/Aligner.cs

@@ -1,5 +1,4 @@
 using System.ComponentModel;
-using static Terminal.Gui.Pos;
 
 namespace Terminal.Gui;
 
@@ -15,7 +14,8 @@ public enum Alignment
     /// </summary>
     /// <remarks>
     ///     <para>
-    ///         If the container is smaller than the total size of the items, the right items will be clipped (their locations will be greater than the container size).
+    ///         If the container is smaller than the total size of the items, the right items will be clipped (their locations
+    ///         will be greater than the container size).
     ///     </para>
     /// </remarks>
     /// <example>
@@ -39,7 +39,8 @@ public enum Alignment
     /// </summary>
     /// <remarks>
     ///     <para>
-    ///         If the container is smaller than the total size of the items, the left items will be clipped (their locations will be negative).
+    ///         If the container is smaller than the total size of the items, the left items will be clipped (their locations
+    ///         will be negative).
     ///     </para>
     /// </remarks>
     /// <example>
@@ -99,7 +100,8 @@ public enum Alignment
     /// </summary>
     /// <remarks>
     ///     <para>
-    ///         If the container is smaller than the total size of the items, the right items will be clipped (their locations will be greater than the container size).
+    ///         If the container is smaller than the total size of the items, the right items will be clipped (their locations
+    ///         will be greater than the container size).
     ///     </para>
     /// </remarks>
     /// <example>
@@ -123,7 +125,8 @@ public enum Alignment
     /// </summary>
     /// <remarks>
     ///     <para>
-    ///         If the container is smaller than the total size of the items, the left items will be clipped (their locations will be negative).
+    ///         If the container is smaller than the total size of the items, the left items will be clipped (their locations
+    ///         will be negative).
     ///     </para>
     /// </remarks>
     /// <example>
@@ -138,7 +141,7 @@ public enum Alignment
     ///     Set <see cref="Aligner.PutSpaceBetweenItems"/> to <see langword="true"/> to ensure at least one line between
     ///     each item.
     /// </summary>
-    LastBottomRestTop = LastRightRestLeft,
+    LastBottomRestTop = LastRightRestLeft
 }
 
 /// <summary>
@@ -157,7 +160,7 @@ public class Aligner : INotifyPropertyChanged
         set
         {
             _alignment = value;
-            PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (nameof (Alignment)));
+            PropertyChanged?.Invoke (this, new (nameof (Alignment)));
         }
     }
 
@@ -172,7 +175,7 @@ public class Aligner : INotifyPropertyChanged
         set
         {
             _containerSize = value;
-            PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (nameof (ContainerSize)));
+            PropertyChanged?.Invoke (this, new (nameof (ContainerSize)));
         }
     }
 
@@ -185,8 +188,9 @@ public class Aligner : INotifyPropertyChanged
     /// </summary>
     /// <remarks>
     ///     <para>
-    ///        If the total size of the items is greater than the container size, the space between items will be ignored starting
-    ///        from the right.
+    ///         If the total size of the items is greater than the container size, the space between items will be ignored
+    ///         starting
+    ///         from the right.
     ///     </para>
     /// </remarks>
     public bool PutSpaceBetweenItems
@@ -195,11 +199,11 @@ public class Aligner : INotifyPropertyChanged
         set
         {
             _putSpaceBetweenItems = value;
-            PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (nameof (PutSpaceBetweenItems)));
+            PropertyChanged?.Invoke (this, new (nameof (PutSpaceBetweenItems)));
         }
     }
 
-    /// <inheritdoc />
+    /// <inheritdoc/>
     public event PropertyChangedEventHandler PropertyChanged;
 
     /// <summary>

+ 2 - 2
Terminal.Gui/Drawing/Thickness.cs

@@ -232,8 +232,8 @@ public class Thickness : IEquatable<Thickness>
             var tf = new TextFormatter
             {
                 Text = label is null ? string.Empty : $"{label} {this}",
-                Justification = Alignment.Centered,
-                VerticalJustification = Alignment.Bottom,
+                Alignment = Alignment.Centered,
+                VerticalAlignment = Alignment.Bottom,
                 AutoSize = true
             };
             tf.Draw (rect, Application.Driver.CurrentAttribute, Application.Driver.CurrentAttribute, rect);

+ 1 - 1
Terminal.Gui/Resources/config.json

@@ -24,7 +24,7 @@
   "Themes": [
     {
       "Default": {
-        "Dialog.DefaultButtonJustification": "Right",
+        "Dialog.DefaultButtonAlignment": "Right",
         "FrameView.DefaultBorderStyle": "Single",
         "Window.DefaultBorderStyle": "Single",
         "ColorSchemes": [

+ 50 - 50
Terminal.Gui/Text/TextFormatter.cs

@@ -3,7 +3,7 @@ using System.Diagnostics;
 namespace Terminal.Gui;
 
 /// <summary>
-///     Provides text formatting. Supports <see cref="View.HotKey"/>s, horizontal justification, vertical justification,
+///     Provides text formatting. Supports <see cref="View.HotKey"/>s, horizontal alignment, vertical alignment,
 ///     multiple lines, and word-based line wrap.
 /// </summary>
 public class TextFormatter
@@ -17,17 +17,17 @@ public class TextFormatter
     private Size _size;
     private int _tabWidth = 4;
     private string _text;
-    private Alignment _textJustification;
+    private Alignment _textAlignment;
     private TextDirection _textDirection;
-    private Alignment _textVerticalJustification;
+    private Alignment _textVerticalAlignment;
     private bool _wordWrap = true;
 
-    /// <summary>Get or sets the horizontal text justification.</summary>
-    /// <value>The text justification.</value>
-    public Alignment Justification
+    /// <summary>Get or sets the horizontal text alignment.</summary>
+    /// <value>The text alignment.</value>
+    public Alignment Alignment
     {
-        get => _textJustification;
-        set => _textJustification = EnableNeedsFormat (value);
+        get => _textAlignment;
+        set => _textAlignment = EnableNeedsFormat (value);
     }
 
     /// <summary>Gets or sets whether the <see cref="Size"/> should be automatically changed to fit the <see cref="Text"/>.</summary>
@@ -222,12 +222,12 @@ public class TextFormatter
         }
     }
 
-    /// <summary>Gets or sets the vertical text-justification.</summary>
-    /// <value>The text vertical justification.</value>
-    public Alignment VerticalJustification
+    /// <summary>Gets or sets the vertical text-alignment.</summary>
+    /// <value>The text vertical alignment.</value>
+    public Alignment VerticalAlignment
     {
-        get => _textVerticalJustification;
-        set => _textVerticalJustification = EnableNeedsFormat (value);
+        get => _textVerticalAlignment;
+        set => _textVerticalAlignment = EnableNeedsFormat (value);
     }
 
     /// <summary>Gets or sets whether word wrap will be used to fit <see cref="Text"/> to <see cref="Size"/>.</summary>
@@ -319,8 +319,8 @@ public class TextFormatter
 
             int x = 0, y = 0;
 
-            // Horizontal Justification
-            if (Justification is Alignment.Right)
+            // Horizontal Alignment
+            if (Alignment is Alignment.Right)
             {
                 if (isVertical)
                 {
@@ -335,7 +335,7 @@ public class TextFormatter
                     CursorPosition = screen.Width - runesWidth + (_hotKeyPos > -1 ? _hotKeyPos : 0);
                 }
             }
-            else if (Justification is Alignment.Left)
+            else if (Alignment is Alignment.Left)
             {
                 if (isVertical)
                 {
@@ -351,7 +351,7 @@ public class TextFormatter
 
                 CursorPosition = _hotKeyPos > -1 ? _hotKeyPos : 0;
             }
-            else if (Justification is Alignment.Justified)
+            else if (Alignment is Alignment.Justified)
             {
                 if (isVertical)
                 {
@@ -374,7 +374,7 @@ public class TextFormatter
 
                 CursorPosition = _hotKeyPos > -1 ? _hotKeyPos : 0;
             }
-            else if (Justification is Alignment.Centered)
+            else if (Alignment is Alignment.Centered)
             {
                 if (isVertical)
                 {
@@ -394,13 +394,13 @@ public class TextFormatter
             }
             else
             {
-                Debug.WriteLine ($"Unsupported Justification: {nameof (VerticalJustification)}");
+                Debug.WriteLine ($"Unsupported Alignment: {nameof (VerticalAlignment)}");
 
                 return;
             }
 
-            // Vertical Justification
-            if (VerticalJustification is Alignment.Bottom)
+            // Vertical Alignment
+            if (VerticalAlignment is Alignment.Bottom)
             {
                 if (isVertical)
                 {
@@ -411,7 +411,7 @@ public class TextFormatter
                     y = screen.Bottom - linesFormatted.Count + line;
                 }
             }
-            else if (VerticalJustification is Alignment.Top)
+            else if (VerticalAlignment is Alignment.Top)
             {
                 if (isVertical)
                 {
@@ -422,7 +422,7 @@ public class TextFormatter
                     y = screen.Top + line;
                 }
             }
-            else if (VerticalJustification is Alignment.Justified)
+            else if (VerticalAlignment is Alignment.Justified)
             {
                 if (isVertical)
                 {
@@ -436,7 +436,7 @@ public class TextFormatter
                         line < linesFormatted.Count - 1 ? screen.Height - interval <= 1 ? screen.Top + 1 : screen.Top + line * interval : screen.Bottom - 1;
                 }
             }
-            else if (VerticalJustification is Alignment.Centered)
+            else if (VerticalAlignment is Alignment.Centered)
             {
                 if (isVertical)
                 {
@@ -451,7 +451,7 @@ public class TextFormatter
             }
             else
             {
-               Debug.WriteLine ($"Unsupported Justification: {nameof (VerticalJustification)}");
+               Debug.WriteLine ($"Unsupported Alignment: {nameof (VerticalAlignment)}");
 
                return;
             }
@@ -474,8 +474,8 @@ public class TextFormatter
                 {
                     if (idx < 0
                         || (isVertical
-                                ? VerticalJustification != Alignment.Bottom && current < 0
-                                : Justification != Alignment.Right && x + current + colOffset < 0))
+                                ? VerticalAlignment != Alignment.Bottom && current < 0
+                                : Alignment != Alignment.Right && x + current + colOffset < 0))
                     {
                         current++;
 
@@ -564,7 +564,7 @@ public class TextFormatter
 
                 if (HotKeyPos > -1 && idx == HotKeyPos)
                 {
-                    if ((isVertical && VerticalJustification == Alignment.Justified) || (!isVertical && Justification == Alignment.Justified))
+                    if ((isVertical && VerticalAlignment == Alignment.Justified) || (!isVertical && Alignment == Alignment.Justified))
                     {
                         CursorPosition = idx - start;
                     }
@@ -702,7 +702,7 @@ public class TextFormatter
                 _lines = Format (
                                  text,
                                  Size.Height,
-                                 VerticalJustification == Alignment.Justified,
+                                 VerticalAlignment == Alignment.Justified,
                                  Size.Width > colsWidth && WordWrap,
                                  PreserveTrailingSpaces,
                                  TabWidth,
@@ -726,7 +726,7 @@ public class TextFormatter
                 _lines = Format (
                                  text,
                                  Size.Width,
-                                 Justification == Alignment.Justified,
+                                 Alignment == Alignment.Justified,
                                  Size.Height > 1 && WordWrap,
                                  PreserveTrailingSpaces,
                                  TabWidth,
@@ -980,7 +980,7 @@ public class TextFormatter
         // if value is not wide enough
         if (text.EnumerateRunes ().Sum (c => c.GetColumns ()) < width)
         {
-            // pad it out with spaces to the given Justification
+            // pad it out with spaces to the given Alignment
             int toPad = width - text.EnumerateRunes ().Sum (c => c.GetColumns ());
 
             return text + new string (' ', toPad);
@@ -1002,7 +1002,7 @@ public class TextFormatter
     /// <param name="textFormatter"><see cref="TextFormatter"/> instance to access any of his objects.</param>
     /// <returns>A list of word wrapped lines.</returns>
     /// <remarks>
-    ///     <para>This method does not do any justification.</para>
+    ///     <para>This method does not do any alignment.</para>
     ///     <para>This method strips Newline ('\n' and '\r\n') sequences before processing.</para>
     ///     <para>
     ///         If <paramref name="preserveTrailingSpaces"/> is <see langword="false"/> at most one space will be preserved
@@ -1034,7 +1034,7 @@ public class TextFormatter
         List<Rune> runes = StripCRLF (text).ToRuneList ();
 
         int start = Math.Max (
-                              !runes.Contains ((Rune)' ') && textFormatter is { VerticalJustification: Alignment.Bottom } && IsVerticalDirection (textDirection)
+                              !runes.Contains ((Rune)' ') && textFormatter is { VerticalAlignment: Alignment.Bottom } && IsVerticalDirection (textDirection)
                                   ? runes.Count - width
                                   : 0,
                               0);
@@ -1252,7 +1252,7 @@ public class TextFormatter
     ///     The number of columns to clip the text to. Text longer than <paramref name="width"/> will be
     ///     clipped.
     /// </param>
-    /// <param name="textJustification">Justification.</param>
+    /// <param name="textAlignment">Alignment.</param>
     /// <param name="textDirection">The text direction.</param>
     /// <param name="tabWidth">The number of columns used for a tab.</param>
     /// <param name="textFormatter"><see cref="TextFormatter"/> instance to access any of his objects.</param>
@@ -1260,13 +1260,13 @@ public class TextFormatter
     public static string ClipAndJustify (
         string text,
         int width,
-        Alignment textJustification,
+        Alignment textAlignment,
         TextDirection textDirection = TextDirection.LeftRight_TopBottom,
         int tabWidth = 0,
         TextFormatter textFormatter = null
     )
     {
-        return ClipAndJustify (text, width, textJustification == Alignment.Justified, textDirection, tabWidth, textFormatter);
+        return ClipAndJustify (text, width, textAlignment == Alignment.Justified, textDirection, tabWidth, textFormatter);
     }
 
     /// <summary>Justifies text within a specified width.</summary>
@@ -1307,12 +1307,12 @@ public class TextFormatter
         {
             if (IsHorizontalDirection (textDirection))
             {
-                if (textFormatter is { Justification: Alignment.Right })
+                if (textFormatter is { Alignment: Alignment.Right })
                 {
                     return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
                 }
 
-                if (textFormatter is { Justification: Alignment.Centered })
+                if (textFormatter is { Alignment: Alignment.Centered })
                 {
                     return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
                 }
@@ -1322,12 +1322,12 @@ public class TextFormatter
 
             if (IsVerticalDirection (textDirection))
             {
-                if (textFormatter is { VerticalJustification: Alignment.Bottom })
+                if (textFormatter is { VerticalAlignment: Alignment.Bottom })
                 {
                     return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
                 }
 
-                if (textFormatter is { VerticalJustification: Alignment.Centered })
+                if (textFormatter is { VerticalAlignment: Alignment.Centered })
                 {
                     return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
                 }
@@ -1345,14 +1345,14 @@ public class TextFormatter
 
         if (IsHorizontalDirection (textDirection))
         {
-            if (textFormatter is { Justification: Alignment.Right })
+            if (textFormatter is { Alignment: Alignment.Right })
             {
                 if (GetRuneWidth (text, tabWidth, textDirection) > width)
                 {
                     return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
                 }
             }
-            else if (textFormatter is { Justification: Alignment.Centered })
+            else if (textFormatter is { Alignment: Alignment.Centered })
             {
                 return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
             }
@@ -1364,14 +1364,14 @@ public class TextFormatter
 
         if (IsVerticalDirection (textDirection))
         {
-            if (textFormatter is { VerticalJustification: Alignment.Bottom })
+            if (textFormatter is { VerticalAlignment: Alignment.Bottom })
             {
                 if (runes.Count - zeroLength > width)
                 {
                     return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
                 }
             }
-            else if (textFormatter is { VerticalJustification: Alignment.Centered })
+            else if (textFormatter is { VerticalAlignment: Alignment.Centered })
             {
                 return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
             }
@@ -1475,10 +1475,10 @@ public class TextFormatter
         return s.ToString ();
     }
 
-    /// <summary>Formats text into lines, applying text justification and optionally wrapping text to new lines on word boundaries.</summary>
+    /// <summary>Formats text into lines, applying text alignment and optionally wrapping text to new lines on word boundaries.</summary>
     /// <param name="text"></param>
     /// <param name="width">The number of columns to constrain the text to for word wrapping and clipping.</param>
-    /// <param name="textJustification">Specifies how the text will be justified horizontally.</param>
+    /// <param name="textAlignment">Specifies how the text will be aligned horizontally.</param>
     /// <param name="wordWrap">
     ///     If <see langword="true"/>, the text will be wrapped to new lines no longer than
     ///     <paramref name="width"/>. If <see langword="false"/>, forces text to fit a single line. Line breaks are converted
@@ -1501,7 +1501,7 @@ public class TextFormatter
     public static List<string> Format (
         string text,
         int width,
-        Alignment textJustification,
+        Alignment textAlignment,
         bool wordWrap,
         bool preserveTrailingSpaces = false,
         int tabWidth = 0,
@@ -1513,7 +1513,7 @@ public class TextFormatter
         return Format (
                        text,
                        width,
-                       textJustification == Alignment.Justified,
+                       textAlignment == Alignment.Justified,
                        wordWrap,
                        preserveTrailingSpaces,
                        tabWidth,
@@ -1523,7 +1523,7 @@ public class TextFormatter
                       );
     }
 
-    /// <summary>Formats text into lines, applying text justification and optionally wrapping text to new lines on word boundaries.</summary>
+    /// <summary>Formats text into lines, applying text alignment and optionally wrapping text to new lines on word boundaries.</summary>
     /// <param name="text"></param>
     /// <param name="width">The number of columns to constrain the text to for word wrapping and clipping.</param>
     /// <param name="justify">Specifies whether the text should be justified.</param>
@@ -1887,7 +1887,7 @@ public class TextFormatter
         return lineIdx;
     }
 
-    /// <summary>Calculates the rectangle required to hold text, assuming no word wrapping or justification.</summary>
+    /// <summary>Calculates the rectangle required to hold text, assuming no word wrapping or alignment.</summary>
     /// <remarks>
     ///     This API will return incorrect results if the text includes glyphs who's width is dependent on surrounding
     ///     glyphs (e.g. Arabic).

+ 47 - 41
Terminal.Gui/View/Layout/PosDim.cs

@@ -46,6 +46,14 @@ namespace Terminal.Gui;
 ///             </item>
 ///             <item>
 ///                 <term>
+///                     <see cref="Pos.Align()"/>
+///                 </term>
+///                 <description>
+///                     Creates a <see cref="Pos"/> object that aligns a set of views.
+///                 </description>
+///             </item>
+///             <item>
+///                 <term>
 ///                     <see cref="Pos.AnchorEnd()"/>
 ///                 </term>
 ///                 <description>
@@ -206,12 +214,12 @@ public class Pos
 
 
     /// <summary>
-    ///      Creates a <see cref="Pos"/> object that justifies a set of views according to the specified justification.
+    ///      Creates a <see cref="Pos"/> object that aligns a set of views according to the specified alignment setting.
     /// </summary>
-    /// <param name="justification"></param>
-    /// <param name="groupId">The optional, unique identifier for the set of views to justify according to <paramref name="justification"/>.</param>
+    /// <param name="alignment"></param>
+    /// <param name="groupId">The optional, unique identifier for the set of views to align according to <paramref name="alignment"/>.</param>
     /// <returns></returns>
-    public static Pos Justify (Alignment justification, int groupId = 0) { return new PosJustify (justification, groupId); }
+    public static Pos Align (Alignment alignment, int groupId = 0) { return new PosAlign (alignment, groupId); }
 
     /// <summary>Serves as the default hash function. </summary>
     /// <returns>A hash code for the current object.</returns>
@@ -496,47 +504,45 @@ public class Pos
 
 
     /// <summary>
-    /// Enables justification of a set of views.
+    /// Enables alignment of a set of views.
     /// </summary>
     /// <remarks>
     /// <para>
-    ///     The Group ID is used to identify a set of views that should be justified together. When only a single
-    ///     set of views is justified, setting the Group ID is not needed because it defaults to 0.
+    ///     The Group ID is used to identify a set of views that should be alignment together. When only a single
+    ///     set of views is aligned, setting the Group ID is not needed because it defaults to 0.
     /// </para>
     /// <para>
-    ///     The first view added to the Superview with a given Group ID is used to determine the justification of the group.
-    ///     The justification is applied to all views with the same Group ID.
+    ///     The first view added to the Superview with a given Group ID is used to determine the alignment of the group.
+    ///     The alignment is applied to all views with the same Group ID.
     /// </para>
     /// </remarks>
-    public class PosJustify : Pos
+    public class PosAlign : Pos
     {
-        // TODO: Figure out how to invalidate _location if Justifier changes.
-
         /// <summary>
         /// The cached location. Used to store the calculated location to avoid recalculating it.
         /// </summary>
         private int? _location;
 
         /// <summary>
-        /// Gets the identifier of a set of views that should be justified together. When only a single
-        /// set of views is justified, setting the <see cref="_groupId"/> is not needed because it defaults to 0.
+        /// Gets the identifier of a set of views that should be aligned together. When only a single
+        /// set of views is aligned, setting the <see cref="_groupId"/> is not needed because it defaults to 0.
         /// </summary>
         private readonly int _groupId;
 
         /// <summary>
-        /// Gets the justification settings.
+        /// Gets the alignment settings.
         /// </summary>
-        public Aligner Justifier { get; } = new ();
+        public Aligner Aligner { get; } = new ();
 
 
         /// <summary>
-        /// Justifies the views in <paramref name="views"/> that have the same group ID as <paramref name="groupId"/>.
+        /// Aligns the views in <paramref name="views"/> that have the same group ID as <paramref name="groupId"/>.
         /// </summary>
         /// <param name="groupId"></param>
         /// <param name="views"></param>
         /// <param name="dimension"></param>
         /// <param name="size"></param>
-        private static void JustifyGroup (int groupId, IList<View> views, Dim.Dimension dimension, int size)
+        private static void AlignGroup (int groupId, IList<View> views, Dim.Dimension dimension, int size)
         {
             if (views is null)
             {
@@ -547,14 +553,14 @@ public class Pos
             List<View> viewsInGroup = views.Where (
                                                    v =>
                                                    {
-                                                       if (dimension == Dimension.Width && v.X is PosJustify justifyX)
+                                                       if (dimension == Dimension.Width && v.X is PosAlign alignX)
                                                        {
-                                                           return justifyX._groupId == groupId;
+                                                           return alignX._groupId == groupId;
                                                        }
 
-                                                       if (dimension == Dimension.Height && v.Y is PosJustify justifyY)
+                                                       if (dimension == Dimension.Height && v.Y is PosAlign alignY)
                                                        {
-                                                           return justifyY._groupId == groupId;
+                                                           return alignY._groupId == groupId;
                                                        }
 
                                                        return false;
@@ -566,13 +572,13 @@ public class Pos
 
             foreach (var view in viewsInGroup)
             {
-                var posJustify = dimension == Dimension.Width ? view.X as PosJustify : view.Y as PosJustify;
+                var posAlign = dimension == Dimension.Width ? view.X as PosAlign : view.Y as PosAlign;
 
-                if (posJustify is { })
+                if (posAlign is { })
                 {
                     if (firstInGroup is null)
                     {
-                        firstInGroup = posJustify.Justifier;
+                        firstInGroup = posAlign.Aligner;
                     }
 
                     dimensionsList.Add (dimension == Dimension.Width ? view.Frame.Width : view.Frame.Height);
@@ -590,29 +596,29 @@ public class Pos
             for (var index = 0; index < viewsInGroup.Count; index++)
             {
                 View view = viewsInGroup [index];
-                PosJustify justify = dimension == Dimension.Width ? view.X as PosJustify : view.Y as PosJustify;
+                PosAlign align = dimension == Dimension.Width ? view.X as PosAlign : view.Y as PosAlign;
 
-                if (justify is { })
+                if (align is { })
                 {
-                    justify._location = locations [index];
+                    align._location = locations [index];
                 }
             }
         }
 
         /// <summary>
-        /// Enables justification of a set of views.
+        /// Enables alignment of a set of views.
         /// </summary>
-        /// <param name="justification"></param>
-        /// <param name="groupId">The unique identifier for the set of views to justify according to <paramref name="justification"/>.</param>
-        public PosJustify (Alignment justification, int groupId = 0)
+        /// <param name="alignment"></param>
+        /// <param name="groupId">The unique identifier for the set of views to align according to <paramref name="alignment"/>.</param>
+        public PosAlign (Alignment alignment, int groupId = 0)
         {
-            Justifier.PutSpaceBetweenItems = true;
-            Justifier.Alignment = justification;
+            Aligner.PutSpaceBetweenItems = true;
+            Aligner.Alignment = alignment;
             _groupId = groupId;
-            Justifier.PropertyChanged += Justifier_PropertyChanged;
+            Aligner.PropertyChanged += Aligner_PropertyChanged;
         }
 
-        private void Justifier_PropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
+        private void Aligner_PropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
         {
             _location = null;
         }
@@ -620,19 +626,19 @@ public class Pos
         /// <inheritdoc />
         public override bool Equals (object other)
         {
-            return other is PosJustify justify && _groupId == justify._groupId && _location == justify._location && justify.Justifier.Equals (Justifier);
+            return other is PosAlign align && _groupId == align._groupId && _location == align._location && align.Aligner.Equals (Aligner);
         }
 
         /// <inheritdoc />
         public override int GetHashCode ()
         {
-            return Justifier.GetHashCode () ^ _groupId.GetHashCode ();
+            return Aligner.GetHashCode () ^ _groupId.GetHashCode ();
         }
 
         /// <inheritdoc />
         public override string ToString ()
         {
-            return $"Justify(groupId={_groupId}, justification={Justifier.Alignment})";
+            return $"Align(groupId={_groupId}, alignment={Aligner.Alignment})";
         }
 
         internal override int Anchor (int width)
@@ -642,7 +648,7 @@ public class Pos
 
         internal override int Calculate (int superviewDimension, Dim dim, View us, Dim.Dimension dimension)
         {
-            if (_location.HasValue && Justifier.ContainerSize == superviewDimension)
+            if (_location.HasValue && Aligner.ContainerSize == superviewDimension)
             {
                 return _location.Value;
             }
@@ -652,7 +658,7 @@ public class Pos
                 return 0;
             }
 
-            JustifyGroup (_groupId, us.SuperView.Subviews, dimension, superviewDimension);
+            AlignGroup (_groupId, us.SuperView.Subviews, dimension, superviewDimension);
 
             if (_location.HasValue)
             {

+ 11 - 11
Terminal.Gui/View/ViewText.cs

@@ -34,7 +34,7 @@ public partial class View
     ///     </para>
     ///     <para>
     ///         The text will be drawn starting at the view origin (0, 0) and will be formatted according
-    ///         to <see cref="TextJustification"/> and <see cref="TextDirection"/>.
+    ///         to <see cref="TextAlignment"/> and <see cref="TextDirection"/>.
     ///     </para>
     ///     <para>
     ///         The text will word-wrap to additional lines if it does not fit horizontally. If <see cref="ContentSize"/>'s height
@@ -80,19 +80,19 @@ public partial class View
     public event EventHandler<StateEventArgs<string>> TextChanged;
 
     /// <summary>
-    ///     Gets or sets how the View's <see cref="Text"/> is justified horizontally when drawn. Changing this property will
+    ///     Gets or sets how the View's <see cref="Text"/> is aligned horizontally when drawn. Changing this property will
     ///     redisplay the <see cref="View"/>.
     /// </summary>
     /// <remarks>
     ///     <para> <see cref="View.Width"/> or <see cref="View.Height"/> are using <see cref="Dim.DimAutoStyle.Text"/>, the <see cref="ContentSize"/> will be adjusted to fit the text.</para>
     /// </remarks>
-    /// <value>The text justification.</value>
-    public virtual Alignment TextJustification
+    /// <value>The text alignment.</value>
+    public virtual Alignment TextAlignment
     {
-        get => TextFormatter.Justification;
+        get => TextFormatter.Alignment;
         set
         {
-            TextFormatter.Justification = value;
+            TextFormatter.Alignment = value;
             UpdateTextFormatterText ();
             OnResizeNeeded ();
         }
@@ -122,20 +122,20 @@ public partial class View
     public TextFormatter TextFormatter { get; init; } = new () { };
 
     /// <summary>
-    ///     Gets or sets how the View's <see cref="Text"/> is justified vertically when drawn. Changing this property will
+    ///     Gets or sets how the View's <see cref="Text"/> is aligned vertically when drawn. Changing this property will
     ///     redisplay
     ///     the <see cref="View"/>.
     /// </summary>
     /// <remarks>
     ///     <para> <see cref="View.Width"/> or <see cref="View.Height"/> are using <see cref="Dim.DimAutoStyle.Text"/>, the <see cref="ContentSize"/> will be adjusted to fit the text.</para>
     /// </remarks>
-    /// <value>The vertical text justification.</value>
-    public virtual Alignment VerticalTextJustification
+    /// <value>The vertical text alignment.</value>
+    public virtual Alignment VerticalTextAlignment
     {
-        get => TextFormatter.VerticalJustification;
+        get => TextFormatter.VerticalAlignment;
         set
         {
-            TextFormatter.VerticalJustification = value;
+            TextFormatter.VerticalAlignment = value;
             SetNeedsDisplay ();
         }
     }

+ 2 - 2
Terminal.Gui/Views/Button.cs

@@ -37,8 +37,8 @@ public class Button : View
     /// <remarks>The width of the <see cref="Button"/> is computed based on the text length. The height will always be 1.</remarks>
     public Button ()
     {
-        TextJustification = Alignment.Centered;
-        VerticalTextJustification = Alignment.Centered;
+        TextAlignment = Alignment.Centered;
+        VerticalTextAlignment = Alignment.Centered;
 
         _leftBracket = Glyphs.LeftBracket;
         _rightBracket = Glyphs.RightBracket;

+ 1 - 1
Terminal.Gui/Views/CheckBox.cs

@@ -153,7 +153,7 @@ public class CheckBox : View
     /// <inheritdoc/>
     protected override void UpdateTextFormatterText ()
     {
-        switch (TextJustification)
+        switch (TextAlignment)
         {
             case Alignment.Left:
             case Alignment.Centered:

+ 6 - 6
Terminal.Gui/Views/Dialog.cs

@@ -51,7 +51,7 @@ public class Dialog : Window
         ColorScheme = Colors.ColorSchemes ["Dialog"];
 
         Modal = true;
-        ButtonJustification = DefaultButtonJustification;
+        ButtonAlignment = DefaultButtonAlignment;
 
         AddCommand (
                     Command.QuitToplevel,
@@ -96,9 +96,9 @@ public class Dialog : Window
         }
     }
 
-    // TODO: Update button.X = Pos.Justify when justification changes
-    /// <summary>Determines how the <see cref="Dialog"/> <see cref="Button"/>s are justified along the bottom of the dialog.</summary>
-    public Alignment ButtonJustification { get; set; }
+    // TODO: Update button.X = Pos.Justify when alignment changes
+    /// <summary>Determines how the <see cref="Dialog"/> <see cref="Button"/>s are aligned along the bottom of the dialog.</summary>
+    public Alignment ButtonAlignment { get; set; }
 
     /// <summary>Optional buttons to lay out at the bottom of the dialog.</summary>
     public Button [] Buttons
@@ -122,7 +122,7 @@ public class Dialog : Window
     /// <remarks>This property can be set in a Theme.</remarks>
     [SerializableConfigurationProperty (Scope = typeof (ThemeScope))]
     [JsonConverter (typeof (JsonStringEnumConverter))]
-    public static Alignment DefaultButtonJustification { get; set; } = Alignment.Right;
+    public static Alignment DefaultButtonAlignment { get; set; } = Alignment.Right;
 
     /// <summary>
     ///     Adds a <see cref="Button"/> to the <see cref="Dialog"/>, its layout will be controlled by the
@@ -136,7 +136,7 @@ public class Dialog : Window
             return;
         }
 
-        button.X = Pos.Justify (ButtonJustification);
+        button.X = Pos.Align (ButtonAlignment);
         button.Y = Pos.AnchorEnd () - 1;
 
         _buttons.Add (button);

+ 1 - 1
Terminal.Gui/Views/Menu/Menu.cs

@@ -891,7 +891,7 @@ internal sealed class Menu : View
                     var tf = new TextFormatter
                     {
                         AutoSize = true,
-                        Justification = Alignment.Centered, HotKeySpecifier = MenuBar.HotKeySpecifier, Text = textToDraw
+                        Alignment = Alignment.Centered, HotKeySpecifier = MenuBar.HotKeySpecifier, Text = textToDraw
                     };
 
                     // The -3 is left/right border + one space (not sure what for)

+ 4 - 4
Terminal.Gui/Views/MessageBox.cs

@@ -340,8 +340,8 @@ public static class MessageBox
             }
         }
 
-        Alignment buttonJust = Dialog.DefaultButtonJustification;
-        Dialog.DefaultButtonJustification = Alignment.Centered;
+        Alignment buttonJust = Dialog.DefaultButtonAlignment;
+        Dialog.DefaultButtonAlignment = Alignment.Centered;
         var d = new Dialog
         {
             Buttons = buttonList.ToArray (),
@@ -350,7 +350,7 @@ public static class MessageBox
             Width = Dim.Percent (60),
             Height = 5 // Border + one line of text + vspace + buttons
         };
-        Dialog.DefaultButtonJustification = buttonJust;
+        Dialog.DefaultButtonAlignment = buttonJust;
 
         if (width != 0)
         {
@@ -374,7 +374,7 @@ public static class MessageBox
         var messageLabel = new Label
         {
             Text = message,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             X = Pos.Center (),
             Y = 0
         };

+ 1 - 1
Terminal.Gui/Views/ProgressBar.cs

@@ -181,7 +181,7 @@ public class ProgressBar : View
 
         if (ProgressBarFormat != ProgressBarFormat.Simple && !_isActivity)
         {
-            var tf = new TextFormatter { Justification = Alignment.Centered, Text = Text };
+            var tf = new TextFormatter { Alignment = Alignment.Centered, Text = Text };
             var attr = new Attribute (ColorScheme.HotNormal.Foreground, ColorScheme.HotNormal.Background);
 
             if (_fraction > .5)

+ 4 - 4
Terminal.Gui/Views/Slider.cs

@@ -930,7 +930,7 @@ public class Slider<T> : View
         }
     }
 
-    private string JustifyText (string text, int width, Alignment justification)
+    private string AlignText (string text, int width, Alignment alignment)
     {
         if (text is null)
         {
@@ -947,7 +947,7 @@ public class Slider<T> : View
         string s2 = new (' ', w % 2);
 
         // Note: The formatter doesn't handle all of this ???
-        switch (justification)
+        switch (alignment)
         {
             case Alignment.Justified:
                 return TextFormatter.Justify (text, width);
@@ -1293,7 +1293,7 @@ public class Slider<T> : View
                     switch (_config._legendsOrientation)
                     {
                         case Orientation.Horizontal:
-                            text = JustifyText (text, _config._innerSpacing + 1, Alignment.Centered);
+                            text = AlignText (text, _config._innerSpacing + 1, Alignment.Centered);
 
                             break;
                         case Orientation.Vertical:
@@ -1311,7 +1311,7 @@ public class Slider<T> : View
 
                             break;
                         case Orientation.Vertical:
-                            text = JustifyText (text, _config._innerSpacing + 1, Alignment.Centered);
+                            text = AlignText (text, _config._innerSpacing + 1, Alignment.Centered);
 
                             break;
                     }

+ 13 - 13
Terminal.Gui/Views/TableView/ColumnStyle.cs

@@ -1,17 +1,17 @@
 namespace Terminal.Gui;
 
 /// <summary>
-///     Describes how to render a given column in  a <see cref="TableView"/> including <see cref="Justification"/> and
+///     Describes how to render a given column in  a <see cref="TableView"/> including <see cref="Alignment"/> and
 ///     textual representation of cells (e.g. date formats)
 ///     <a href="../docs/tableview.md">See TableView Deep Dive for more information</a>.
 /// </summary>
 public class ColumnStyle
 {
     /// <summary>
-    ///     Defines a delegate for returning custom justification per cell based on cell values. When specified this will
-    ///     override <see cref="Justification"/>
+    ///     Defines a delegate for returning custom alignment per cell based on cell values. When specified this will
+    ///     override <see cref="Alignment"/>
     /// </summary>
-    public Func<object, Alignment> JustificationGetter;
+    public Func<object, Alignment> AlignmentGetter;
 
     /// <summary>
     ///     Defines a delegate for returning a custom color scheme per cell based on cell values. Return null for the
@@ -29,10 +29,10 @@ public class ColumnStyle
     private bool _visible = true;
 
     /// <summary>
-    ///     Defines the default justification for all values rendered in this column. For custom justification based on cell
-    ///     contents use <see cref="JustificationGetter"/>.
+    ///     Defines the default alignment for all values rendered in this column. For custom alignment based on cell
+    ///     contents use <see cref="AlignmentGetter"/>.
     /// </summary>
-    public Alignment Justification { get; set; }
+    public Alignment Alignment { get; set; }
 
     /// <summary>Defines the format for values e.g. "yyyy-MM-dd" for dates</summary>
     public string Format { get; set; }
@@ -69,19 +69,19 @@ public class ColumnStyle
     }
 
     /// <summary>
-    ///     Returns the justification for the cell based on <paramref name="cellValue"/> and <see cref="JustificationGetter"/>/
-    ///     <see cref="Justification"/>
+    ///     Returns the alignment for the cell based on <paramref name="cellValue"/> and <see cref="AlignmentGetter"/>/
+    ///     <see cref="Alignment"/>
     /// </summary>
     /// <param name="cellValue"></param>
     /// <returns></returns>
-    public Alignment GetJustification (object cellValue)
+    public Alignment GetAlignment (object cellValue)
     {
-        if (JustificationGetter is { })
+        if (AlignmentGetter is { })
         {
-            return JustificationGetter (cellValue);
+            return AlignmentGetter (cellValue);
         }
 
-        return Justification;
+        return Alignment;
     }
 
     /// <summary>

+ 3 - 3
Terminal.Gui/Views/TableView/TableView.cs

@@ -2057,13 +2057,13 @@ public class TableView : View
 
     /// <summary>
     ///     Truncates or pads <paramref name="representation"/> so that it occupies a exactly
-    ///     <paramref name="availableHorizontalSpace"/> using the justification specified in <paramref name="colStyle"/> (or left
+    ///     <paramref name="availableHorizontalSpace"/> using the alignment specified in <paramref name="colStyle"/> (or left
     ///     if no style is defined)
     /// </summary>
     /// <param name="originalCellValue">The object in this cell of the <see cref="Table"/></param>
     /// <param name="representation">The string representation of <paramref name="originalCellValue"/></param>
     /// <param name="availableHorizontalSpace"></param>
-    /// <param name="colStyle">Optional style indicating custom justification for the cell</param>
+    /// <param name="colStyle">Optional style indicating custom alignment for the cell</param>
     /// <returns></returns>
     private string TruncateOrPad (
         object originalCellValue,
@@ -2085,7 +2085,7 @@ public class TableView : View
                         - (representation.EnumerateRunes ().Sum (c => c.GetColumns ())
                            + 1 /*leave 1 space for cell boundary*/);
 
-            switch (colStyle?.GetJustification (originalCellValue) ?? Alignment.Left)
+            switch (colStyle?.GetAlignment (originalCellValue) ?? Alignment.Left)
             {
                 case Alignment.Left:
                     return representation + new string (' ', toPad);

+ 6 - 6
Terminal.Gui/Views/TextValidateField.cs

@@ -539,7 +539,7 @@ namespace Terminal.Gui
             {
                 int c = _provider.Cursor (mouseEvent.X - GetMargins (Viewport.Width).left);
 
-                if (_provider.Fixed == false && TextJustification == Alignment.Right && Text.Length > 0)
+                if (_provider.Fixed == false && TextAlignment == Alignment.Right && Text.Length > 0)
                 {
                     c++;
                 }
@@ -633,7 +633,7 @@ namespace Terminal.Gui
             // When it's right-aligned and it's a normal input, the cursor behaves differently.
             int curPos;
 
-            if (_provider?.Fixed == false && TextJustification == Alignment.Right)
+            if (_provider?.Fixed == false && TextAlignment == Alignment.Right)
             {
                 curPos = _cursorPosition + left - 1;
             }
@@ -650,7 +650,7 @@ namespace Terminal.Gui
         /// <returns></returns>
         private bool BackspaceKeyHandler ()
         {
-            if (_provider.Fixed == false && TextJustification == Alignment.Right && _cursorPosition <= 1)
+            if (_provider.Fixed == false && TextAlignment == Alignment.Right && _cursorPosition <= 1)
             {
                 return false;
             }
@@ -688,7 +688,7 @@ namespace Terminal.Gui
         /// <returns></returns>
         private bool DeleteKeyHandler ()
         {
-            if (_provider.Fixed == false && TextJustification == Alignment.Right)
+            if (_provider.Fixed == false && TextAlignment == Alignment.Right)
             {
                 _cursorPosition = _provider.CursorLeft (_cursorPosition);
             }
@@ -709,7 +709,7 @@ namespace Terminal.Gui
             return true;
         }
 
-        /// <summary>Margins for text justification.</summary>
+        /// <summary>Margins for text alignment.</summary>
         /// <param name="width">Total width</param>
         /// <returns>Left and right margins</returns>
         private (int left, int right) GetMargins (int width)
@@ -717,7 +717,7 @@ namespace Terminal.Gui
             int count = Text.Length;
             int total = width - count;
 
-            switch (TextJustification)
+            switch (TextAlignment)
             {
                 case Alignment.Left:
                     return (0, total);

+ 1 - 1
Terminal.Gui/Views/Wizard/Wizard.cs

@@ -85,7 +85,7 @@ public class Wizard : Dialog
     {
         // Using Justify causes the Back and Next buttons to be hard justified against
         // the left and right edge
-        ButtonJustification = Alignment.Justified;
+        ButtonAlignment = Alignment.Justified;
         BorderStyle = LineStyle.Double;
 
         //// Add a horiz separator

+ 2 - 2
UICatalog/Scenarios/BasicColors.cs

@@ -32,7 +32,7 @@ public class BasicColors : Scenario
                 Y = 0,
                 Width = 1,
                 Height = 13,
-                VerticalTextJustification = Alignment.Bottom,
+                VerticalTextAlignment = Alignment.Bottom,
                 ColorScheme = new ColorScheme { Normal = attr },
                 Text = bg.ToString (),
                 TextDirection = TextDirection.TopBottom_LeftRight
@@ -45,7 +45,7 @@ public class BasicColors : Scenario
                 Y = y,
                 Width = 13,
                 Height = 1,
-                TextJustification = Alignment.Right,
+                TextAlignment = Alignment.Right,
                 ColorScheme = new ColorScheme { Normal = attr },
                 Text = bg.ToString ()
             };

+ 26 - 26
UICatalog/Scenarios/Buttons.cs

@@ -209,7 +209,7 @@ public class Buttons : Scenario
 
         var label = new Label
         {
-            X = 2, Y = Pos.Bottom (computedFrame) + 1, Text = "Text Justification (changes the four buttons above): "
+            X = 2, Y = Pos.Bottom (computedFrame) + 1, Text = "Text Alignment (changes the four buttons above): "
         };
         main.Add (label);
 
@@ -287,39 +287,39 @@ public class Buttons : Scenario
                                               switch (args.SelectedItem)
                                               {
                                                   case 0:
-                                                      moveBtn.TextJustification = Alignment.Left;
-                                                      sizeBtn.TextJustification = Alignment.Left;
-                                                      moveBtnA.TextJustification = Alignment.Left;
-                                                      sizeBtnA.TextJustification = Alignment.Left;
-                                                      moveHotKeyBtn.TextJustification = Alignment.Left;
-                                                      moveUnicodeHotKeyBtn.TextJustification = Alignment.Left;
+                                                      moveBtn.TextAlignment = Alignment.Left;
+                                                      sizeBtn.TextAlignment = Alignment.Left;
+                                                      moveBtnA.TextAlignment = Alignment.Left;
+                                                      sizeBtnA.TextAlignment = Alignment.Left;
+                                                      moveHotKeyBtn.TextAlignment = Alignment.Left;
+                                                      moveUnicodeHotKeyBtn.TextAlignment = Alignment.Left;
 
                                                       break;
                                                   case 1:
-                                                      moveBtn.TextJustification = Alignment.Right;
-                                                      sizeBtn.TextJustification = Alignment.Right;
-                                                      moveBtnA.TextJustification = Alignment.Right;
-                                                      sizeBtnA.TextJustification = Alignment.Right;
-                                                      moveHotKeyBtn.TextJustification = Alignment.Right;
-                                                      moveUnicodeHotKeyBtn.TextJustification = Alignment.Right;
+                                                      moveBtn.TextAlignment = Alignment.Right;
+                                                      sizeBtn.TextAlignment = Alignment.Right;
+                                                      moveBtnA.TextAlignment = Alignment.Right;
+                                                      sizeBtnA.TextAlignment = Alignment.Right;
+                                                      moveHotKeyBtn.TextAlignment = Alignment.Right;
+                                                      moveUnicodeHotKeyBtn.TextAlignment = Alignment.Right;
 
                                                       break;
                                                   case 2:
-                                                      moveBtn.TextJustification = Alignment.Centered;
-                                                      sizeBtn.TextJustification = Alignment.Centered;
-                                                      moveBtnA.TextJustification = Alignment.Centered;
-                                                      sizeBtnA.TextJustification = Alignment.Centered;
-                                                      moveHotKeyBtn.TextJustification = Alignment.Centered;
-                                                      moveUnicodeHotKeyBtn.TextJustification = Alignment.Centered;
+                                                      moveBtn.TextAlignment = Alignment.Centered;
+                                                      sizeBtn.TextAlignment = Alignment.Centered;
+                                                      moveBtnA.TextAlignment = Alignment.Centered;
+                                                      sizeBtnA.TextAlignment = Alignment.Centered;
+                                                      moveHotKeyBtn.TextAlignment = Alignment.Centered;
+                                                      moveUnicodeHotKeyBtn.TextAlignment = Alignment.Centered;
 
                                                       break;
                                                   case 3:
-                                                      moveBtn.TextJustification = Alignment.Justified;
-                                                      sizeBtn.TextJustification = Alignment.Justified;
-                                                      moveBtnA.TextJustification = Alignment.Justified;
-                                                      sizeBtnA.TextJustification = Alignment.Justified;
-                                                      moveHotKeyBtn.TextJustification = Alignment.Justified;
-                                                      moveUnicodeHotKeyBtn.TextJustification = Alignment.Justified;
+                                                      moveBtn.TextAlignment = Alignment.Justified;
+                                                      sizeBtn.TextAlignment = Alignment.Justified;
+                                                      moveBtnA.TextAlignment = Alignment.Justified;
+                                                      sizeBtnA.TextAlignment = Alignment.Justified;
+                                                      moveHotKeyBtn.TextAlignment = Alignment.Justified;
+                                                      moveUnicodeHotKeyBtn.TextAlignment = Alignment.Justified;
 
                                                       break;
                                               }
@@ -439,7 +439,7 @@ public class Buttons : Scenario
                 Y = Pos.Top (_down),
                 Width = Dim.Function (() => Digits),
                 Height = 1,
-                TextJustification = Alignment.Centered,
+                TextAlignment = Alignment.Centered,
                 CanFocus = true
             };
 

+ 1 - 1
UICatalog/Scenarios/CharacterMap.cs

@@ -958,7 +958,7 @@ internal class CharMap : View
             Y = 1,
             Width = Dim.Fill (),
             Height = Dim.Fill (1),
-            TextJustification = Alignment.Centered
+            TextAlignment = Alignment.Centered
         };
         var spinner = new SpinnerView { X = Pos.Center (), Y = Pos.Center (), Style = new Aesthetic () };
         spinner.AutoSpin = true;

+ 2 - 2
UICatalog/Scenarios/CollectionNavigatorTester.cs

@@ -142,7 +142,7 @@ public class CollectionNavigatorTester : Scenario
         var label = new Label
         {
             Text = "ListView",
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             X = 0,
             Y = 1, // for menu
             Width = Dim.Percent (50),
@@ -171,7 +171,7 @@ public class CollectionNavigatorTester : Scenario
         var label = new Label
         {
             Text = "TreeView",
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             X = Pos.Right (_listView) + 2,
             Y = 1, // for menu
             Width = Dim.Percent (50),

+ 2 - 2
UICatalog/Scenarios/ColorPicker.cs

@@ -69,8 +69,8 @@ public class ColorPickers : Scenario
         {
             Title = "Color Sample",
             Text = "Lorem Ipsum",
-            TextJustification = Alignment.Centered,
-            VerticalTextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
+            VerticalTextAlignment = Alignment.Centered,
             BorderStyle = LineStyle.Heavy,
             X = Pos.Center (),
             Y = Pos.Center (),

+ 15 - 15
UICatalog/Scenarios/ComputedLayout.cs

@@ -86,12 +86,12 @@ public class ComputedLayout : Scenario
         var i = 1;
         var txt = "Resize the terminal to see computed layout in action.";
         List<Label> labelList = new ();
-        labelList.Add (new Label { Text = "The lines below show different justification" });
+        labelList.Add (new Label { Text = "The lines below show different alignment" });
 
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Left,
+                           TextAlignment = Alignment.Left,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -103,7 +103,7 @@ public class ComputedLayout : Scenario
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Right,
+                           TextAlignment = Alignment.Right,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -115,7 +115,7 @@ public class ComputedLayout : Scenario
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Centered,
+                           TextAlignment = Alignment.Centered,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -127,7 +127,7 @@ public class ComputedLayout : Scenario
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Justified,
+                           TextAlignment = Alignment.Justified,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -148,12 +148,12 @@ public class ComputedLayout : Scenario
                                  };
         i = 1;
         labelList = new List<Label> ();
-        labelList.Add (new Label { Text = "The lines below show different justifications" });
+        labelList.Add (new Label { Text = "The lines below show different alignment" });
 
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Left,
+                           TextAlignment = Alignment.Left,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -165,7 +165,7 @@ public class ComputedLayout : Scenario
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Right,
+                           TextAlignment = Alignment.Right,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -177,7 +177,7 @@ public class ComputedLayout : Scenario
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Centered,
+                           TextAlignment = Alignment.Centered,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -189,7 +189,7 @@ public class ComputedLayout : Scenario
         labelList.Add (
                        new Label
                        {
-                           TextJustification = Alignment.Justified,
+                           TextAlignment = Alignment.Justified,
                            Width = Dim.Fill (),
                            X = 0,
                            Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -324,7 +324,7 @@ public class ComputedLayout : Scenario
         var anchorEndLabel1 = new Label
         {
             Text = "This Label should be the 3rd to last line (AnchorEnd (3)).",
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             ColorScheme = Colors.ColorSchemes ["Menu"],
             Width = Dim.Fill (5),
             X = 5,
@@ -338,7 +338,7 @@ public class ComputedLayout : Scenario
         {
             Text =
                 "This TextField should be the 4th to last line (AnchorEnd (3) - 1).",
-            TextJustification = Alignment.Left,
+            TextAlignment = Alignment.Left,
             ColorScheme = Colors.ColorSchemes ["Menu"],
             Width = Dim.Fill (5),
             X = 5,
@@ -397,9 +397,9 @@ public class ComputedLayout : Scenario
 
 
         // Center three buttons with 
-        leftButton.X = Pos.Justify (Alignment.Centered);
-        centerButton.X = Pos.Justify (Alignment.Centered);
-        rightButton.X = Pos.Justify (Alignment.Centered);
+        leftButton.X = Pos.Align (Alignment.Centered);
+        centerButton.X = Pos.Align (Alignment.Centered);
+        rightButton.X = Pos.Align (Alignment.Centered);
 
         Application.Run (app);
         app.Dispose ();

+ 15 - 15
UICatalog/Scenarios/CsvEditor.cs

@@ -76,19 +76,19 @@ public class CsvEditor : Scenario
                                  new []
                                  {
                                      _miLeft = new MenuItem (
-                                                             "_Justify Left",
+                                                             "_Align Left",
                                                              "",
-                                                             () => Justify (Alignment.Left)
+                                                             () => Align (Alignment.Left)
                                                             ),
                                      _miRight = new MenuItem (
-                                                              "_Justify Right",
+                                                              "_Align Right",
                                                               "",
-                                                              () => Justify (Alignment.Right)
+                                                              () => Align (Alignment.Right)
                                                              ),
                                      _miCentered = new MenuItem (
-                                                                 "_Justify Centered",
+                                                                 "_Align Centered",
                                                                  "",
-                                                                 () => Justify (Alignment.Centered)
+                                                                 () => Align (Alignment.Centered)
                                                                 ),
 
                                      // Format requires hard typed data table, when we read a CSV everything is untyped (string) so this only works for new columns in this demo
@@ -133,7 +133,7 @@ public class CsvEditor : Scenario
             Y = Pos.Bottom (_tableView),
             Text = "0,0",
             Width = Dim.Fill (),
-            TextJustification = Alignment.Right
+            TextAlignment = Alignment.Right
         };
         _selectedCellLabel.TextChanged += SelectedCellLabel_TextChanged;
 
@@ -218,7 +218,7 @@ public class CsvEditor : Scenario
         _tableView.Update ();
     }
 
-    private void Justify (Alignment newJustification)
+    private void Align (Alignment newAlignment)
     {
         if (NoTableLoaded ())
         {
@@ -226,11 +226,11 @@ public class CsvEditor : Scenario
         }
 
         ColumnStyle style = _tableView.Style.GetOrCreateColumnStyle (_tableView.SelectedColumn);
-        style.Justification = newJustification;
+        style.Alignment = newAlignment;
 
-        _miLeft.Checked = style.Justification == Alignment.Left;
-        _miRight.Checked = style.Justification == Alignment.Right;
-        _miCentered.Checked = style.Justification == Alignment.Centered;
+        _miLeft.Checked = style.Alignment == Alignment.Left;
+        _miRight.Checked = style.Alignment == Alignment.Right;
+        _miCentered.Checked = style.Alignment == Alignment.Centered;
 
         _tableView.Update ();
     }
@@ -437,9 +437,9 @@ public class CsvEditor : Scenario
 
         ColumnStyle style = _tableView.Style.GetColumnStyleIfAny (_tableView.SelectedColumn);
 
-        _miLeft.Checked = style?.Justification == Alignment.Left;
-        _miRight.Checked = style?.Justification == Alignment.Right;
-        _miCentered.Checked = style?.Justification == Alignment.Centered;
+        _miLeft.Checked = style?.Alignment == Alignment.Left;
+        _miRight.Checked = style?.Alignment == Alignment.Right;
+        _miCentered.Checked = style?.Alignment == Alignment.Centered;
     }
 
     private void Open ()

+ 9 - 9
UICatalog/Scenarios/Dialogs.cs

@@ -18,7 +18,7 @@ public class Dialogs : Scenario
         var numButtonsLabel = new Label
         {
             X = 0,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "_Number of Buttons:"
         };
 
@@ -28,7 +28,7 @@ public class Dialogs : Scenario
             Y = 0,
             Width = Dim.Width (numButtonsLabel),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "_Width:"
         };
         frame.Add (label);
@@ -49,7 +49,7 @@ public class Dialogs : Scenario
             Y = Pos.Bottom (label),
             Width = Dim.Width (numButtonsLabel),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "_Height:"
         };
         frame.Add (label);
@@ -83,7 +83,7 @@ public class Dialogs : Scenario
             Y = Pos.Bottom (label),
             Width = Dim.Width (numButtonsLabel),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "_Title:"
         };
         frame.Add (label);
@@ -115,7 +115,7 @@ public class Dialogs : Scenario
         {
             X = Pos.Right (numButtonsLabel) + 1,
             Y = Pos.Bottom (numButtonsLabel),
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = $"_Add {char.ConvertFromUtf32 (CODE_POINT)} to button text to stress wide char support",
             Checked = false
         };
@@ -127,7 +127,7 @@ public class Dialogs : Scenario
             Y = Pos.Bottom (glyphsNotWords),
             Width = Dim.Width (numButtonsLabel),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Button St_yle:"
         };
         frame.Add (label);
@@ -153,7 +153,7 @@ public class Dialogs : Scenario
             RadioLabels = labels.ToArray (),
         };
         frame.Add (styleRadioGroup);
-        styleRadioGroup.SelectedItem = labels.ToList().IndexOf (Dialog.DefaultButtonJustification.ToString());
+        styleRadioGroup.SelectedItem = labels.ToList().IndexOf (Dialog.DefaultButtonAlignment.ToString());
 
         frame.ValidatePosDim = true;
 
@@ -175,7 +175,7 @@ public class Dialogs : Scenario
 
         label = new()
         {
-            X = Pos.Center (), Y = Pos.Bottom (frame) + 4, TextJustification = Alignment.Right, Text = "Button Pressed:"
+            X = Pos.Center (), Y = Pos.Bottom (frame) + 4, TextAlignment = Alignment.Right, Text = "Button Pressed:"
         };
         Win.Add (label);
 
@@ -282,7 +282,7 @@ public class Dialogs : Scenario
             dialog = new()
             {
                 Title = titleEdit.Text,
-                ButtonJustification = (Alignment)styleRadioGroup.SelectedItem,
+                ButtonAlignment = (Alignment)styleRadioGroup.SelectedItem,
                 Buttons = buttons.ToArray ()
             };
 

+ 2 - 2
UICatalog/Scenarios/DynamicMenuBar.cs

@@ -623,7 +623,7 @@ public class DynamicMenuBar : Scenario
             var _lblMenuBar = new Label
             {
                 ColorScheme = Colors.ColorSchemes ["Dialog"],
-                TextJustification = Alignment.Centered,
+                TextAlignment = Alignment.Centered,
                 X = Pos.Right (_btnPrevious) + 1,
                 Y = Pos.Top (_btnPrevious),
 
@@ -636,7 +636,7 @@ public class DynamicMenuBar : Scenario
 
             var _lblParent = new Label
             {
-                TextJustification = Alignment.Centered,
+                TextAlignment = Alignment.Centered,
                 X = Pos.Right (_btnPrevious) + 1,
                 Y = Pos.Top (_btnPrevious) + 1,
 

+ 9 - 9
UICatalog/Scenarios/Editor.cs

@@ -882,7 +882,7 @@ public class Editor : Scenario
         {
             Y = 1,
             Width = lblWidth,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
 
             Text = "Find:"
         };
@@ -903,7 +903,7 @@ public class Editor : Scenario
             Y = Pos.Top (label),
             Width = 20,
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             IsDefault = true,
 
             Text = "Find _Next"
@@ -917,7 +917,7 @@ public class Editor : Scenario
             Y = Pos.Top (btnFindNext) + 1,
             Width = 20,
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Text = "Find _Previous"
         };
@@ -937,7 +937,7 @@ public class Editor : Scenario
             X = Pos.Right (txtToFind) + 1,
             Y = Pos.Top (btnFindPrevious) + 2,
             Width = 20,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Text = "Cancel"
         };
@@ -1134,7 +1134,7 @@ public class Editor : Scenario
         {
             Y = 1,
             Width = lblWidth,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
 
             Text = "Find:"
         };
@@ -1155,7 +1155,7 @@ public class Editor : Scenario
             Y = Pos.Top (label),
             Width = 20,
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             IsDefault = true,
 
             Text = "Replace _Next"
@@ -1181,7 +1181,7 @@ public class Editor : Scenario
             Y = Pos.Top (btnFindNext) + 1,
             Width = 20,
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Text = "Replace _Previous"
         };
@@ -1194,7 +1194,7 @@ public class Editor : Scenario
             Y = Pos.Top (btnFindPrevious) + 1,
             Width = 20,
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Text = "Replace _All"
         };
@@ -1215,7 +1215,7 @@ public class Editor : Scenario
             X = Pos.Right (txtToFind) + 1,
             Y = Pos.Top (btnReplaceAll) + 1,
             Width = 20,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Text = "Cancel"
         };

+ 1 - 1
UICatalog/Scenarios/ListColumns.cs

@@ -247,7 +247,7 @@ public class ListColumns : Scenario
             Text = "0,0",
 
             Width = Dim.Fill (),
-            TextJustification = Alignment.Right
+            TextAlignment = Alignment.Right
         };
 
         Win.Add (selectedCellLabel);

+ 9 - 9
UICatalog/Scenarios/MessageBoxes.cs

@@ -14,7 +14,7 @@ public class MessageBoxes : Scenario
         var frame = new FrameView { X = Pos.Center (), Y = 1, Width = Dim.Percent (75), Title = "MessageBox Options" };
         Win.Add (frame);
 
-        var label = new Label { X = 0, Y = 0, TextJustification = Alignment.Right, Text = "Width:" };
+        var label = new Label { X = 0, Y = 0, TextAlignment = Alignment.Right, Text = "Width:" };
         frame.Add (label);
 
         var widthEdit = new TextField
@@ -34,7 +34,7 @@ public class MessageBoxes : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Height:"
         };
         frame.Add (label);
@@ -69,7 +69,7 @@ public class MessageBoxes : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Title:"
         };
         frame.Add (label);
@@ -91,7 +91,7 @@ public class MessageBoxes : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Message:"
         };
         frame.Add (label);
@@ -113,7 +113,7 @@ public class MessageBoxes : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Num Buttons:"
         };
         frame.Add (label);
@@ -135,7 +135,7 @@ public class MessageBoxes : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Default Button:"
         };
         frame.Add (label);
@@ -157,7 +157,7 @@ public class MessageBoxes : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Style:"
         };
         frame.Add (label);
@@ -195,7 +195,7 @@ public class MessageBoxes : Scenario
 
         label = new()
         {
-            X = Pos.Center (), Y = Pos.Bottom (frame) + 2, TextJustification = Alignment.Right, Text = "Button Pressed:"
+            X = Pos.Center (), Y = Pos.Bottom (frame) + 2, TextAlignment = Alignment.Right, Text = "Button Pressed:"
         };
         Win.Add (label);
 
@@ -204,7 +204,7 @@ public class MessageBoxes : Scenario
             X = Pos.Center (),
             Y = Pos.Bottom (label) + 1,
             ColorScheme = Colors.ColorSchemes ["Error"],
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Text = " "
         };
 

+ 2 - 2
UICatalog/Scenarios/Mouse.cs

@@ -98,8 +98,8 @@ public class Mouse : Scenario
             Width = 20,
             Height = 3,
             Text = "Enter/Leave Demo",
-            TextJustification = Alignment.Centered,
-            VerticalTextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
+            VerticalTextAlignment = Alignment.Centered,
             ColorScheme = Colors.ColorSchemes ["Dialog"]
         };
         win.Add (demo);

+ 50 - 50
UICatalog/Scenarios/PosJustification.cs → UICatalog/Scenarios/PosAlign.cs

@@ -5,13 +5,13 @@ using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
 
-[ScenarioMetadata ("PosJustification", "Shows off Pos.Justify")]
+[ScenarioMetadata ("Pos.Align", "Shows off Pos.Align")]
 [ScenarioCategory ("Layout")]
-public sealed class PosJustification : Scenario
+public sealed class PosAlign : Scenario
 {
-    private readonly Aligner _horizJustifier = new ();
+    private readonly Aligner _horizAligner = new ();
     private int _leftMargin;
-    private readonly Aligner _vertJustifier = new ();
+    private readonly Aligner _vertAligner = new ();
     private int _topMargin;
 
     public override void Main ()
@@ -43,53 +43,53 @@ public sealed class PosJustification : Scenario
     {
         ColorScheme colorScheme = Colors.ColorSchemes ["Toplevel"];
 
-        RadioGroup justification = new ()
+        RadioGroup alignRadioGroup = new ()
         {
-            X = Pos.Justify (_horizJustifier.Alignment),
+            X = Pos.Align (_horizAligner.Alignment),
             Y = Pos.Center (),
             RadioLabels = GetUniqueEnumNames<Alignment> (false).ToArray (),
             ColorScheme = colorScheme
         };
 
-        justification.SelectedItemChanged += (s, e) =>
+        alignRadioGroup.SelectedItemChanged += (s, e) =>
                                              {
-                                                 _horizJustifier.Alignment =
-                                                     (Alignment)Enum.Parse (typeof (Alignment), justification.SelectedItem.ToString ());
+                                                 _horizAligner.Alignment =
+                                                     (Alignment)Enum.Parse (typeof (Alignment), alignRadioGroup.SelectedItem.ToString ());
 
-                                                 foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosJustify))
+                                                 foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosAlign))
                                                  {
-                                                     if (view.X is Pos.PosJustify j)
+                                                     if (view.X is Pos.PosAlign j)
                                                      {
-                                                         var newJust = new Pos.PosJustify (_horizJustifier.Alignment)
+                                                         var newJust = new Pos.PosAlign (_horizAligner.Alignment)
                                                          {
-                                                             Justifier =
+                                                             Aligner =
                                                              {
-                                                                 PutSpaceBetweenItems = _horizJustifier.PutSpaceBetweenItems
+                                                                 PutSpaceBetweenItems = _horizAligner.PutSpaceBetweenItems
                                                              }
                                                          };
                                                          view.X = newJust;
                                                      }
                                                  }
                                              };
-        appWindow.Add (justification);
+        appWindow.Add (alignRadioGroup);
 
         CheckBox putSpaces = new ()
         {
-            X = Pos.Justify (_horizJustifier.Alignment),
-            Y = Pos.Top (justification),
+            X = Pos.Align (_horizAligner.Alignment),
+            Y = Pos.Top (alignRadioGroup),
             ColorScheme = colorScheme,
             Text = "Spaces"
         };
 
         putSpaces.Toggled += (s, e) =>
                              {
-                                 _horizJustifier.PutSpaceBetweenItems = e.NewValue is { } && e.NewValue.Value;
+                                 _horizAligner.PutSpaceBetweenItems = e.NewValue is { } && e.NewValue.Value;
 
-                                 foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosJustify))
+                                 foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosAlign))
                                  {
-                                     if (view.X is Pos.PosJustify j)
+                                     if (view.X is Pos.PosAlign j)
                                      {
-                                         j.Justifier.PutSpaceBetweenItems = _horizJustifier.PutSpaceBetweenItems;
+                                         j.Aligner.PutSpaceBetweenItems = _horizAligner.PutSpaceBetweenItems;
                                      }
                                  }
                              };
@@ -107,10 +107,10 @@ public sealed class PosJustification : Scenario
                           {
                               _leftMargin = e.NewValue is { } && e.NewValue.Value ? 1 : 0;
 
-                              foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosJustify))
+                              foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosAlign))
                               {
                                   // Skip the justification radio group
-                                  if (view != justification)
+                                  if (view != alignRadioGroup)
                                   {
                                       view.Margin.Thickness = new (_leftMargin, 0, 0, 0);
                                   }
@@ -125,15 +125,15 @@ public sealed class PosJustification : Scenario
         addedViews.Add (
                         new()
                         {
-                            X = Pos.Justify (_horizJustifier.Alignment),
+                            X = Pos.Align (_horizAligner.Alignment),
                             Y = Pos.Center (),
                             Text = NumberToWords.Convert (0)
                         });
 
         Buttons.NumericUpDown<int> addedViewsUpDown = new Buttons.NumericUpDown<int>
         {
-            X = Pos.Justify (_horizJustifier.Alignment),
-            Y = Pos.Top (justification),
+            X = Pos.Align (_horizAligner.Alignment),
+            Y = Pos.Top (alignRadioGroup),
             Width = 9,
             Title = "Added",
             ColorScheme = colorScheme,
@@ -171,7 +171,7 @@ public sealed class PosJustification : Scenario
                                                   {
                                                       var button = new Button
                                                       {
-                                                          X = Pos.Justify (_horizJustifier.Alignment),
+                                                          X = Pos.Align (_horizAligner.Alignment),
                                                           Y = Pos.Center (),
                                                           Text = NumberToWords.Convert (i + 1)
                                                       };
@@ -189,53 +189,53 @@ public sealed class PosJustification : Scenario
     {
         ColorScheme colorScheme = Colors.ColorSchemes ["Error"];
 
-        RadioGroup justification = new ()
+        RadioGroup alignRadioGroup = new ()
         {
             X = 0,
-            Y = Pos.Justify (_vertJustifier.Alignment),
+            Y = Pos.Align (_vertAligner.Alignment),
             RadioLabels = GetUniqueEnumNames<Alignment> (true).Reverse ().ToArray (),
             ColorScheme = colorScheme
         };
 
-        justification.SelectedItemChanged += (s, e) =>
+        alignRadioGroup.SelectedItemChanged += (s, e) =>
                                              {
-                                                 _vertJustifier.Alignment =
-                                                     (Alignment)Enum.Parse (typeof (Alignment), justification.SelectedItem.ToString ());
+                                                 _vertAligner.Alignment =
+                                                     (Alignment)Enum.Parse (typeof (Alignment), alignRadioGroup.SelectedItem.ToString ());
 
-                                                 foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosJustify))
+                                                 foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosAlign))
                                                  {
-                                                     if (view.Y is Pos.PosJustify j)
+                                                     if (view.Y is Pos.PosAlign j)
                                                      {
-                                                         var newJust = new Pos.PosJustify (_vertJustifier.Alignment)
+                                                         var newJust = new Pos.PosAlign (_vertAligner.Alignment)
                                                          {
-                                                             Justifier =
+                                                             Aligner =
                                                              {
-                                                                 PutSpaceBetweenItems = _vertJustifier.PutSpaceBetweenItems
+                                                                 PutSpaceBetweenItems = _vertAligner.PutSpaceBetweenItems
                                                              }
                                                          };
                                                          view.Y = newJust;
                                                      }
                                                  }
                                              };
-        appWindow.Add (justification);
+        appWindow.Add (alignRadioGroup);
 
         CheckBox putSpaces = new ()
         {
             X = 0,
-            Y = Pos.Justify (_vertJustifier.Alignment),
+            Y = Pos.Align (_vertAligner.Alignment),
             ColorScheme = colorScheme,
             Text = "Spaces"
         };
 
         putSpaces.Toggled += (s, e) =>
                              {
-                                 _vertJustifier.PutSpaceBetweenItems = e.NewValue is { } && e.NewValue.Value;
+                                 _vertAligner.PutSpaceBetweenItems = e.NewValue is { } && e.NewValue.Value;
 
-                                 foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosJustify))
+                                 foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosAlign))
                                  {
-                                     if (view.Y is Pos.PosJustify j)
+                                     if (view.Y is Pos.PosAlign j)
                                      {
-                                         j.Justifier.PutSpaceBetweenItems = _vertJustifier.PutSpaceBetweenItems;
+                                         j.Aligner.PutSpaceBetweenItems = _vertAligner.PutSpaceBetweenItems;
                                      }
                                  }
                              };
@@ -253,10 +253,10 @@ public sealed class PosJustification : Scenario
                           {
                               _topMargin = e.NewValue is { } && e.NewValue.Value ? 1 : 0;
 
-                              foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosJustify))
+                              foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosAlign))
                               {
                                   // Skip the justification radio group
-                                  if (view != justification)
+                                  if (view != alignRadioGroup)
                                   {
                                       view.Margin.Thickness = new (0, _topMargin, 0, 0);
                                   }
@@ -272,14 +272,14 @@ public sealed class PosJustification : Scenario
                         new()
                         {
                             X = 0,
-                            Y = Pos.Justify (_vertJustifier.Alignment),
+                            Y = Pos.Align (_vertAligner.Alignment),
                             Text = NumberToWords.Convert (0)
                         });
 
         Buttons.NumericUpDown<int> addedViewsUpDown = new Buttons.NumericUpDown<int>
         {
             X = 0,
-            Y = Pos.Justify (_vertJustifier.Alignment),
+            Y = Pos.Align (_vertAligner.Alignment),
             Width = 9,
             Title = "Added",
             ColorScheme = colorScheme,
@@ -318,7 +318,7 @@ public sealed class PosJustification : Scenario
                                                       var button = new CheckBox
                                                       {
                                                           X = 0,
-                                                          Y = Pos.Justify (_vertJustifier.Alignment),
+                                                          Y = Pos.Align (_vertAligner.Alignment),
                                                           Text = NumberToWords.Convert (i + 1)
                                                       };
                                                       appWindow.Add (button);
@@ -375,8 +375,8 @@ public sealed class PosJustification : Scenario
                 Width = 5
             };
 
-            v.X = Pos.Justify (Alignment.Right, i / 3);
-            v.Y = Pos.Justify (Alignment.Justified, i % 3 + 10);
+            v.X = Pos.Align (Alignment.Right, i / 3);
+            v.Y = Pos.Align (Alignment.Justified, i % 3 + 10);
 
             container.Add (v);
         }

+ 5 - 5
UICatalog/Scenarios/TableEditor.cs

@@ -707,7 +707,7 @@ public class TableEditor : Scenario
             Text = "0,0",
 
             Width = Dim.Fill (),
-            TextJustification = Alignment.Right
+            TextAlignment = Alignment.Right
         };
 
         Win.Add (selectedCellLabel);
@@ -1107,12 +1107,12 @@ public class TableEditor : Scenario
     {
         _tableView.Style.ColumnStyles.Clear ();
 
-        var alignMid = new ColumnStyle { Justification = Alignment.Centered };
-        var alignRight = new ColumnStyle { Justification = Alignment.Right };
+        var alignMid = new ColumnStyle { Alignment = Alignment.Centered };
+        var alignRight = new ColumnStyle { Alignment = Alignment.Right };
 
         var dateFormatStyle = new ColumnStyle
         {
-            Justification = Alignment.Right,
+            Alignment = Alignment.Right,
             RepresentationGetter = v =>
                                        v is DateTime d ? d.ToString ("yyyy-MM-dd") : v.ToString ()
         };
@@ -1121,7 +1121,7 @@ public class TableEditor : Scenario
         {
             Format = "0.##",
             MinWidth = 10,
-            JustificationGetter = v => v is double d
+            AlignmentGetter = v => v is double d
                                        ?
 
                                        // align negative values right

+ 1 - 1
UICatalog/Scenarios/Text.cs

@@ -290,7 +290,7 @@ public class Text : Scenario
             X = Pos.Right (regexProvider) + 1,
             Y = Pos.Y (regexProvider),
             Width = 30,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Provider = provider2
         };
         Win.Add (regexProviderField);

+ 52 - 52
UICatalog/Scenarios/TextJustificationAndDirection.cs → UICatalog/Scenarios/TextAlignmentAndDirection.cs

@@ -6,9 +6,9 @@ using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
 
-[ScenarioMetadata ("Text Justification and Direction", "Demos horizontal and vertical text justification and direction.")]
+[ScenarioMetadata ("Text Alignment and Direction", "Demos horizontal and vertical text alignment and direction.")]
 [ScenarioCategory ("Text and Formatting")]
-public class TextJustificationAndDirections : Scenario
+public class TextAlignmentAndDirection : Scenario
 {
     public override void Main ()
     {
@@ -35,7 +35,7 @@ public class TextJustificationAndDirections : Scenario
             Y = 1,
             Width = 9,
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             ColorScheme = Colors.ColorSchemes ["Dialog"],
             Text = "Left"
         };
@@ -46,7 +46,7 @@ public class TextJustificationAndDirections : Scenario
             Y = 2,
             Width = 9,
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             ColorScheme = Colors.ColorSchemes ["Dialog"],
             Text = "Centered"
         };
@@ -57,7 +57,7 @@ public class TextJustificationAndDirections : Scenario
             Y = 3,
             Width = 9,
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             ColorScheme = Colors.ColorSchemes ["Dialog"],
             Text = "Right"
         };
@@ -68,7 +68,7 @@ public class TextJustificationAndDirections : Scenario
             Y = 4,
             Width = 9,
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             ColorScheme = Colors.ColorSchemes ["Dialog"],
             Text = "Justified"
         };
@@ -80,7 +80,7 @@ public class TextJustificationAndDirections : Scenario
             Width = Dim.Fill (1) - 9,
             Height = 1,
             ColorScheme = color1,
-            TextJustification = Alignment.Left,
+            TextAlignment = Alignment.Left,
             Text = txt
         };
 
@@ -91,7 +91,7 @@ public class TextJustificationAndDirections : Scenario
             Width = Dim.Fill (1) - 9,
             Height = 1,
             ColorScheme = color2,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Text = txt
         };
 
@@ -102,7 +102,7 @@ public class TextJustificationAndDirections : Scenario
             Width = Dim.Fill (1) - 9,
             Height = 1,
             ColorScheme = color1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = txt
         };
 
@@ -113,7 +113,7 @@ public class TextJustificationAndDirections : Scenario
             Width = Dim.Fill (1) - 9,
             Height = 1,
             ColorScheme = color2,
-            TextJustification = Alignment.Justified,
+            TextAlignment = Alignment.Justified,
             Text = txt
         };
 
@@ -141,7 +141,7 @@ public class TextJustificationAndDirections : Scenario
             Height = 9,
             ColorScheme = color1,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Bottom,
+            VerticalTextAlignment = Alignment.Bottom,
             Text = "Top"
         };
         labelVT.TextFormatter.WordWrap = false;
@@ -154,7 +154,7 @@ public class TextJustificationAndDirections : Scenario
             Height = 9,
             ColorScheme = color1,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Bottom,
+            VerticalTextAlignment = Alignment.Bottom,
             Text = "Centered"
         };
         labelVM.TextFormatter.WordWrap = false;
@@ -167,7 +167,7 @@ public class TextJustificationAndDirections : Scenario
             Height = 9,
             ColorScheme = color1,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Bottom,
+            VerticalTextAlignment = Alignment.Bottom,
             Text = "Bottom"
         };
         labelVB.TextFormatter.WordWrap = false;
@@ -180,7 +180,7 @@ public class TextJustificationAndDirections : Scenario
             Height = 9,
             ColorScheme = color1,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Bottom,
+            VerticalTextAlignment = Alignment.Bottom,
             Text = "Justified"
         };
         labelVJ.TextFormatter.WordWrap = false;
@@ -193,7 +193,7 @@ public class TextJustificationAndDirections : Scenario
             Height = Dim.Fill (1),
             ColorScheme = color1,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Top,
+            VerticalTextAlignment = Alignment.Top,
             Text = txt
         };
         txtLabelVT.TextFormatter.WordWrap = false;
@@ -206,7 +206,7 @@ public class TextJustificationAndDirections : Scenario
             Height = Dim.Fill (1),
             ColorScheme = color2,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Centered,
+            VerticalTextAlignment = Alignment.Centered,
             Text = txt
         };
         txtLabelVM.TextFormatter.WordWrap = false;
@@ -219,7 +219,7 @@ public class TextJustificationAndDirections : Scenario
             Height = Dim.Fill (1),
             ColorScheme = color1,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Bottom,
+            VerticalTextAlignment = Alignment.Bottom,
             Text = txt
         };
         txtLabelVB.TextFormatter.WordWrap = false;
@@ -232,7 +232,7 @@ public class TextJustificationAndDirections : Scenario
             Height = Dim.Fill (1),
             ColorScheme = color2,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Justified,
+            VerticalTextAlignment = Alignment.Justified,
             Text = txt
         };
         txtLabelVJ.TextFormatter.WordWrap = false;
@@ -268,8 +268,8 @@ public class TextJustificationAndDirections : Scenario
             Y = 1,
             Width = Dim.Percent (100f / 3f),
             Height = Dim.Percent (100f / 3f),
-            TextJustification = Alignment.Left,
-            VerticalTextJustification = Alignment.Top,
+            TextAlignment = Alignment.Left,
+            VerticalTextAlignment = Alignment.Top,
             ColorScheme = color1,
             Text = txt
         };
@@ -281,8 +281,8 @@ public class TextJustificationAndDirections : Scenario
             Y = 1,
             Width = Dim.Percent (100f / 3f),
             Height = Dim.Percent (100f / 3f),
-            TextJustification = Alignment.Centered,
-            VerticalTextJustification = Alignment.Top,
+            TextAlignment = Alignment.Centered,
+            VerticalTextAlignment = Alignment.Top,
             ColorScheme = color1,
             Text = txt
         };
@@ -294,8 +294,8 @@ public class TextJustificationAndDirections : Scenario
             Y = 1,
             Width = Dim.Percent (100f, true),
             Height = Dim.Percent (100f / 3f),
-            TextJustification = Alignment.Right,
-            VerticalTextJustification = Alignment.Top,
+            TextAlignment = Alignment.Right,
+            VerticalTextAlignment = Alignment.Top,
             ColorScheme = color1,
             Text = txt
         };
@@ -307,8 +307,8 @@ public class TextJustificationAndDirections : Scenario
             Y = Pos.Bottom (txtLabelTL) + 1,
             Width = Dim.Width (txtLabelTL),
             Height = Dim.Percent (100f / 3f),
-            TextJustification = Alignment.Left,
-            VerticalTextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Left,
+            VerticalTextAlignment = Alignment.Centered,
             ColorScheme = color1,
             Text = txt
         };
@@ -320,8 +320,8 @@ public class TextJustificationAndDirections : Scenario
             Y = Pos.Bottom (txtLabelTC) + 1,
             Width = Dim.Width (txtLabelTC),
             Height = Dim.Percent (100f / 3f),
-            TextJustification = Alignment.Centered,
-            VerticalTextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
+            VerticalTextAlignment = Alignment.Centered,
             ColorScheme = color1,
             Text = txt
         };
@@ -333,8 +333,8 @@ public class TextJustificationAndDirections : Scenario
             Y = Pos.Bottom (txtLabelTR) + 1,
             Width = Dim.Percent (100f, true),
             Height = Dim.Percent (100f / 3f),
-            TextJustification = Alignment.Right,
-            VerticalTextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Right,
+            VerticalTextAlignment = Alignment.Centered,
             ColorScheme = color1,
             Text = txt
         };
@@ -346,8 +346,8 @@ public class TextJustificationAndDirections : Scenario
             Y = Pos.Bottom (txtLabelML) + 1,
             Width = Dim.Width (txtLabelML),
             Height = Dim.Percent (100f, true),
-            TextJustification = Alignment.Left,
-            VerticalTextJustification = Alignment.Bottom,
+            TextAlignment = Alignment.Left,
+            VerticalTextAlignment = Alignment.Bottom,
             ColorScheme = color1,
             Text = txt
         };
@@ -359,8 +359,8 @@ public class TextJustificationAndDirections : Scenario
             Y = Pos.Bottom (txtLabelMC) + 1,
             Width = Dim.Width (txtLabelMC),
             Height = Dim.Percent (100f, true),
-            TextJustification = Alignment.Centered,
-            VerticalTextJustification = Alignment.Bottom,
+            TextAlignment = Alignment.Centered,
+            VerticalTextAlignment = Alignment.Bottom,
             ColorScheme = color1,
             Text = txt
         };
@@ -372,8 +372,8 @@ public class TextJustificationAndDirections : Scenario
             Y = Pos.Bottom (txtLabelMR) + 1,
             Width = Dim.Percent (100f, true),
             Height = Dim.Percent (100f, true),
-            TextJustification = Alignment.Right,
-            VerticalTextJustification = Alignment.Bottom,
+            TextAlignment = Alignment.Right,
+            VerticalTextAlignment = Alignment.Bottom,
             ColorScheme = color1,
             Text = txt
         };
@@ -389,10 +389,10 @@ public class TextJustificationAndDirections : Scenario
         mtxts.Add (txtLabelBC);
         mtxts.Add (txtLabelBR);
 
-        // Save Justification in Data
+        // Save Alignment in Data
         foreach (Label t in mtxts)
         {
-            t.Data = new { h = t.TextJustification, v = t.VerticalTextJustification };
+            t.Data = new { h = t.TextAlignment, v = t.VerticalTextAlignment };
         }
 
         container.Add (txtLabelTL);
@@ -593,8 +593,8 @@ public class TextJustificationAndDirections : Scenario
 
                 foreach (Label t in mtxts)
                 {
-                    t.TextJustification = (Alignment)((dynamic)t.Data).h;
-                    t.VerticalTextJustification = (Alignment)((dynamic)t.Data).v;
+                    t.TextAlignment = (Alignment)((dynamic)t.Data).h;
+                    t.VerticalTextAlignment = (Alignment)((dynamic)t.Data).v;
                 }
             }
             else
@@ -611,16 +611,16 @@ public class TextJustificationAndDirections : Scenario
                         switch (justifyOptions.SelectedItem)
                         {
                             case 0:
-                                t.VerticalTextJustification = Alignment.Justified;
-                                t.TextJustification = ((dynamic)t.Data).h;
+                                t.VerticalTextAlignment = Alignment.Justified;
+                                t.TextAlignment = ((dynamic)t.Data).h;
                                 break;
                             case 1:
-                                t.VerticalTextJustification = (Alignment)((dynamic)t.Data).v;
-                                t.TextJustification = Alignment.Justified;
+                                t.VerticalTextAlignment = (Alignment)((dynamic)t.Data).v;
+                                t.TextAlignment = Alignment.Justified;
                                 break;
                             case 2:
-                                t.VerticalTextJustification = Alignment.Justified;
-                                t.TextJustification = Alignment.Justified;
+                                t.VerticalTextAlignment = Alignment.Justified;
+                                t.TextAlignment = Alignment.Justified;
                                 break;
                         }
                     }
@@ -629,16 +629,16 @@ public class TextJustificationAndDirections : Scenario
                         switch (justifyOptions.SelectedItem)
                         {
                             case 0:
-                                t.TextJustification = Alignment.Justified;
-                                t.VerticalTextJustification = ((dynamic)t.Data).v;
+                                t.TextAlignment = Alignment.Justified;
+                                t.VerticalTextAlignment = ((dynamic)t.Data).v;
                                 break;
                             case 1:
-                                t.TextJustification = (Alignment)((dynamic)t.Data).h;
-                                t.VerticalTextJustification = Alignment.Justified;
+                                t.TextAlignment = (Alignment)((dynamic)t.Data).h;
+                                t.VerticalTextAlignment = Alignment.Justified;
                                 break;
                             case 2:
-                                t.TextJustification = Alignment.Justified;
-                                t.VerticalTextJustification = Alignment.Justified;
+                                t.TextAlignment = Alignment.Justified;
+                                t.VerticalTextAlignment = Alignment.Justified;
                                 break;
                         }
                     }

+ 21 - 21
UICatalog/Scenarios/TextFormatterDemo.cs

@@ -75,17 +75,17 @@ public class TextFormatterDemo : Scenario
             }
         }
 
-        List<Alignment> justifications = GetUniqueEnumValues<Alignment>().ToList ();
-        Label [] singleLines = new Label [justifications.Count];
-        Label [] multipleLines = new Label [justifications.Count];
+        List<Alignment> alignments = GetUniqueEnumValues<Alignment>().ToList ();
+        Label [] singleLines = new Label [alignments.Count];
+        Label [] multipleLines = new Label [alignments.Count];
 
         var multiLineHeight = 5;
 
-        foreach (Alignment justification in justifications)
+        foreach (Alignment alignment in alignments)
         {
-            singleLines [(int)justification] = new()
+            singleLines [(int)alignment] = new()
             {
-                TextJustification = justification,
+                TextAlignment = alignment,
                 X = 0,
 
                 Width = Dim.Fill (),
@@ -94,9 +94,9 @@ public class TextFormatterDemo : Scenario
                 Text = text
             };
 
-            multipleLines [(int)justification] = new()
+            multipleLines [(int)alignment] = new()
             {
-                TextJustification = justification,
+                TextAlignment = alignment,
                 X = 0,
 
                 Width = Dim.Fill (),
@@ -112,33 +112,33 @@ public class TextFormatterDemo : Scenario
         };
         app.Add (label);
 
-        foreach (Alignment justification in justifications)
+        foreach (Alignment alignment in alignments)
         {
-            label = new() { Y = Pos.Bottom (label), Text = $"{justification}:" };
+            label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" };
             app.Add (label);
-            singleLines [(int)justification].Y = Pos.Bottom (label);
-            app.Add (singleLines [(int)justification]);
-            label = singleLines [(int)justification];
+            singleLines [(int)alignment].Y = Pos.Bottom (label);
+            app.Add (singleLines [(int)alignment]);
+            label = singleLines [(int)alignment];
         }
 
         label = new() { Y = Pos.Bottom (label), Text = "Demonstrating multi-line and word wrap:" };
         app.Add (label);
 
-        foreach (Alignment justification in justifications)
+        foreach (Alignment alignment in alignments)
         {
-            label = new() { Y = Pos.Bottom (label), Text = $"{justification}:" };
+            label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" };
             app.Add (label);
-            multipleLines [(int)justification].Y = Pos.Bottom (label);
-            app.Add (multipleLines [(int)justification]);
-            label = multipleLines [(int)justification];
+            multipleLines [(int)alignment].Y = Pos.Bottom (label);
+            app.Add (multipleLines [(int)alignment]);
+            label = multipleLines [(int)alignment];
         }
 
         unicodeCheckBox.Toggled += (s, e) =>
                                    {
-                                       foreach (Alignment justification in justifications)
+                                       foreach (Alignment alignment in alignments)
                                        {
-                                           singleLines [(int)justification].Text = e.OldValue == true ? text : unicode;
-                                           multipleLines [(int)justification].Text = e.OldValue == true ? text : unicode;
+                                           singleLines [(int)alignment].Text = e.OldValue == true ? text : unicode;
+                                           multipleLines [(int)alignment].Text = e.OldValue == true ? text : unicode;
                                        }
                                    };
 

+ 6 - 6
UICatalog/Scenarios/TimeAndDate.cs

@@ -57,7 +57,7 @@ public class TimeAndDate : Scenario
         {
             X = Pos.Center (),
             Y = Pos.Bottom (longDate) + 1,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Width = Dim.Fill (),
             Text = "Old Time: "
@@ -68,7 +68,7 @@ public class TimeAndDate : Scenario
         {
             X = Pos.Center (),
             Y = Pos.Bottom (_lblOldTime) + 1,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Width = Dim.Fill (),
             Text = "New Time: "
@@ -79,7 +79,7 @@ public class TimeAndDate : Scenario
         {
             X = Pos.Center (),
             Y = Pos.Bottom (_lblNewTime) + 1,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Width = Dim.Fill (),
             Text = "Time Format: "
@@ -90,7 +90,7 @@ public class TimeAndDate : Scenario
         {
             X = Pos.Center (),
             Y = Pos.Bottom (_lblTimeFmt) + 2,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Width = Dim.Fill (),
             Text = "Old Date: "
@@ -101,7 +101,7 @@ public class TimeAndDate : Scenario
         {
             X = Pos.Center (),
             Y = Pos.Bottom (_lblOldDate) + 1,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Width = Dim.Fill (),
             Text = "New Date: "
@@ -112,7 +112,7 @@ public class TimeAndDate : Scenario
         {
             X = Pos.Center (),
             Y = Pos.Bottom (_lblNewDate) + 1,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
 
             Width = Dim.Fill (),
             Text = "Date Format: "

+ 1 - 1
UICatalog/Scenarios/Unicode.cs

@@ -132,7 +132,7 @@ public class UnicodeInMenu : Scenario
 
             Width = Dim.Percent (50),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = $"Justify Right - {gitString}"
         };
         Win.Add (checkBox, checkBoxRight);

+ 5 - 5
UICatalog/Scenarios/ViewExperiments.cs

@@ -60,7 +60,7 @@ public class ViewExperiments : Scenario
             Width = 17,
             Title = "Window 1",
             Text = "Window #2",
-            TextJustification = Alignment.Centered
+            TextAlignment = Alignment.Centered
         };
 
         window1.Margin.Thickness = new (0);
@@ -84,7 +84,7 @@ public class ViewExperiments : Scenario
             Width = 37,
             Title = "Window2",
             Text = "Window #2 (Right(window1)+1",
-            TextJustification = Alignment.Centered
+            TextAlignment = Alignment.Centered
         };
 
         //view3.InitializeFrames ();
@@ -109,7 +109,7 @@ public class ViewExperiments : Scenario
             Width = 37,
             Title = "View4",
             Text = "View #4 (Right(window2)+1",
-            TextJustification = Alignment.Centered
+            TextAlignment = Alignment.Centered
         };
 
         //view4.InitializeFrames ();
@@ -134,7 +134,7 @@ public class ViewExperiments : Scenario
             Width = Dim.Fill (),
             Title = "View5",
             Text = "View #5 (Right(view4)+1 Fill",
-            TextJustification = Alignment.Centered
+            TextAlignment = Alignment.Centered
         };
 
         //view5.InitializeFrames ();
@@ -181,7 +181,7 @@ public class ViewExperiments : Scenario
             X = Pos.Center (),
             Y = Pos.Percent (50),
             Width = 30,
-            TextJustification = Alignment.Centered
+            TextAlignment = Alignment.Centered
         };
         label50.Border.Thickness = new (1, 3, 1, 1);
         label50.Height = 5;

+ 4 - 4
UICatalog/Scenarios/Wizards.cs

@@ -21,7 +21,7 @@ public class Wizards : Scenario
         };
         Win.Add (frame);
 
-        var label = new Label { X = 0, Y = 0, TextJustification = Alignment.Right, Text = "Width:" };
+        var label = new Label { X = 0, Y = 0, TextAlignment = Alignment.Right, Text = "Width:" };
         frame.Add (label);
 
         var widthEdit = new TextField
@@ -41,7 +41,7 @@ public class Wizards : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Height:"
         };
         frame.Add (label);
@@ -63,7 +63,7 @@ public class Wizards : Scenario
 
             Width = Dim.Width (label),
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Text = "Title:"
         };
         frame.Add (label);
@@ -88,7 +88,7 @@ public class Wizards : Scenario
 
         label = new()
         {
-            X = Pos.Center (), Y = Pos.AnchorEnd (1), TextJustification = Alignment.Right, Text = "Action:"
+            X = Pos.Center (), Y = Pos.AnchorEnd (1), TextAlignment = Alignment.Right, Text = "Action:"
         };
         Win.Add (label);
 

+ 3 - 3
UnitTests/Configuration/ThemeScopeTests.cs

@@ -29,12 +29,12 @@ public class ThemeScopeTests
     {
         Reset ();
         Assert.NotEmpty (Themes);
-        Assert.Equal (Alignment.Right, Dialog.DefaultButtonJustification);
+        Assert.Equal (Alignment.Right, Dialog.DefaultButtonAlignment);
 
-        Themes ["Default"] ["Dialog.DefaultButtonJustification"].PropertyValue = Alignment.Centered;
+        Themes ["Default"] ["Dialog.DefaultButtonAlignment"].PropertyValue = Alignment.Centered;
 
         ThemeManager.Themes! [ThemeManager.SelectedTheme]!.Apply ();
-        Assert.Equal (Alignment.Centered, Dialog.DefaultButtonJustification);
+        Assert.Equal (Alignment.Centered, Dialog.DefaultButtonAlignment);
         Reset ();
     }
 

+ 2 - 2
UnitTests/Configuration/ThemeTests.cs

@@ -77,7 +77,7 @@ public class ThemeTests
     public void TestSerialize_RoundTrip ()
     {
         var theme = new ThemeScope ();
-        theme ["Dialog.DefaultButtonJustification"].PropertyValue = Alignment.Right;
+        theme ["Dialog.DefaultButtonAlignment"].PropertyValue = Alignment.Right;
 
         string json = JsonSerializer.Serialize (theme, _jsonOptions);
 
@@ -85,7 +85,7 @@ public class ThemeTests
 
         Assert.Equal (
                       Alignment.Right,
-                      (Alignment)deserialized ["Dialog.DefaultButtonJustification"].PropertyValue
+                      (Alignment)deserialized ["Dialog.DefaultButtonAlignment"].PropertyValue
                      );
         Reset ();
     }

+ 16 - 16
UnitTests/Dialogs/DialogTests.cs

@@ -32,7 +32,7 @@ public class DialogTests
             Title = title,
             Width = width,
             Height = 1,
-            ButtonJustification = Alignment.Centered,
+            ButtonAlignment = Alignment.Centered,
             Buttons = [new Button { Text = btn1Text }]
         };
 
@@ -57,7 +57,7 @@ public class DialogTests
             Title = title,
             Width = width,
             Height = 1,
-            ButtonJustification = Alignment.Justified,
+            ButtonAlignment = Alignment.Justified,
             Buttons = [new Button { Text = btn1Text }]
         };
 
@@ -82,7 +82,7 @@ public class DialogTests
             Title = title,
             Width = width,
             Height = 1,
-            ButtonJustification = Alignment.Right,
+            ButtonAlignment = Alignment.Right,
             Buttons = [new Button { Text = btn1Text }]
         };
 
@@ -107,7 +107,7 @@ public class DialogTests
             Title = title,
             Width = width,
             Height = 1,
-            ButtonJustification = Alignment.Left,
+            ButtonAlignment = Alignment.Left,
             Buttons = [new Button { Text = btn1Text }]
         };
 
@@ -129,7 +129,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Four ()
+    public void ButtonAlignment_Four ()
     {
         RunState runstate = null;
 
@@ -219,7 +219,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Four_On_Too_Small_Width ()
+    public void ButtonAlignment_Four_On_Too_Small_Width ()
     {
         RunState runstate = null;
 
@@ -312,7 +312,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Four_WideOdd ()
+    public void ButtonAlignment_Four_WideOdd ()
     {
         RunState runstate = null;
 
@@ -404,7 +404,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Four_Wider ()
+    public void ButtonAlignment_Four_Wider ()
     {
         RunState runstate = null;
 
@@ -498,7 +498,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_One ()
+    public void ButtonAlignment_One ()
     {
         var d = (FakeDriver)Driver;
         RunState runstate = null;
@@ -636,7 +636,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Three ()
+    public void ButtonAlignment_Three ()
     {
         RunState runstate = null;
 
@@ -720,7 +720,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Two ()
+    public void ButtonAlignment_Two ()
     {
         RunState runstate = null;
 
@@ -798,7 +798,7 @@ public class DialogTests
 
     [Fact]
     [AutoInitShutdown]
-    public void ButtonJustification_Two_Hidden ()
+    public void ButtonAlignment_Two_Hidden ()
     {
         RunState runstate = null;
         var firstIteration = false;
@@ -889,7 +889,7 @@ public class DialogTests
 
         win.Loaded += (s, a) =>
                       {
-                          Dialog.DefaultButtonJustification = Alignment.Centered;
+                          Dialog.DefaultButtonAlignment = Alignment.Centered;
                           var dlg = new Dialog { Width = 18, Height = 3, Buttons = [new () { Text = "Ok" }] };
 
                           dlg.Loaded += (s, a) =>
@@ -973,7 +973,7 @@ public class DialogTests
         var win = new Window ();
 
         int iterations = -1;
-        Dialog.DefaultButtonJustification = Alignment.Centered;
+        Dialog.DefaultButtonAlignment = Alignment.Centered;
 
         Iteration += (s, a) =>
                      {
@@ -1008,7 +1008,7 @@ public class DialogTests
     public void Dialog_Opened_From_Another_Dialog ()
     {
         ((FakeDriver)Driver).SetBufferSize (30, 10);
-        Dialog.DefaultButtonJustification = Alignment.Centered;
+        Dialog.DefaultButtonAlignment = Alignment.Centered;
 
         var btn1 = new Button { Text = "press me 1" };
         Button btn2 = null;
@@ -1359,7 +1359,7 @@ public class DialogTests
             Y = 0,
             Width = width,
             Height = 1,
-            ButtonJustification = align,
+            ButtonAlignment = align,
             Buttons = btns
         };
 

+ 59 - 59
UnitTests/Text/TextFormatterTests.cs

@@ -53,36 +53,36 @@ public class TextFormatterTests
         tf.Text = testText;
         Size expectedSize = new (testText.Length, 1);
         Assert.Equal (testText, tf.Text);
-        Assert.Equal (Alignment.Left, tf.Justification);
+        Assert.Equal (Alignment.Left, tf.Alignment);
         Assert.Equal (expectedSize, tf.Size);
         tf.Draw (testBounds, new Attribute (), new Attribute ());
         Assert.Equal (expectedSize, tf.Size);
         Assert.NotEmpty (tf.GetLines ());
 
-        tf.Justification = Alignment.Right;
+        tf.Alignment = Alignment.Right;
         expectedSize = new (testText.Length, 1);
         Assert.Equal (testText, tf.Text);
-        Assert.Equal (Alignment.Right, tf.Justification);
+        Assert.Equal (Alignment.Right, tf.Alignment);
         Assert.Equal (expectedSize, tf.Size);
         tf.Draw (testBounds, new Attribute (), new Attribute ());
         Assert.Equal (expectedSize, tf.Size);
         Assert.NotEmpty (tf.GetLines ());
 
-        tf.Justification = Alignment.Right;
+        tf.Alignment = Alignment.Right;
         expectedSize = new (testText.Length, 1);
         tf.Size = expectedSize;
         Assert.Equal (testText, tf.Text);
-        Assert.Equal (Alignment.Right, tf.Justification);
+        Assert.Equal (Alignment.Right, tf.Alignment);
         Assert.Equal (expectedSize, tf.Size);
         tf.Draw (testBounds, new Attribute (), new Attribute ());
         Assert.Equal (expectedSize, tf.Size);
         Assert.NotEmpty (tf.GetLines ());
 
-        tf.Justification = Alignment.Centered;
+        tf.Alignment = Alignment.Centered;
         expectedSize = new (testText.Length, 1);
         tf.Size = expectedSize;
         Assert.Equal (testText, tf.Text);
-        Assert.Equal (Alignment.Centered, tf.Justification);
+        Assert.Equal (Alignment.Centered, tf.Alignment);
         Assert.Equal (expectedSize, tf.Size);
         tf.Draw (testBounds, new Attribute (), new Attribute ());
         Assert.Equal (expectedSize, tf.Size);
@@ -219,19 +219,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Centered (string text, string justifiedText, int maxWidth)
     {
-        var justify = Alignment.Centered;
+        var alignment = Alignment.Centered;
         var textDirection = TextDirection.LeftRight_TopBottom;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -277,19 +277,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Justified (string text, string justifiedText, int maxWidth)
     {
-        var justify = Alignment.Justified;
+        var alignment = Alignment.Justified;
         var textDirection = TextDirection.LeftRight_TopBottom;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -328,19 +328,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Left (string text, string justifiedText, int maxWidth)
     {
-        var justify = Alignment.Left;
+        var alignment = Alignment.Left;
         var textDirection = TextDirection.LeftRight_BottomTop;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -377,19 +377,19 @@ public class TextFormatterTests
     [InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
     public void ClipAndJustify_Valid_Right (string text, string justifiedText, int maxWidth)
     {
-        var justify = Alignment.Right;
+        var alignment = Alignment.Right;
         var textDirection = TextDirection.LeftRight_BottomTop;
         var tabWidth = 1;
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         int expectedClippedWidth = Math.Min (justifiedText.GetRuneCount (), maxWidth);
 
         Assert.Equal (
                       justifiedText,
-                      TextFormatter.ClipAndJustify (text, maxWidth, justify, textDirection, tabWidth)
+                      TextFormatter.ClipAndJustify (text, maxWidth, alignment, textDirection, tabWidth)
                      );
         Assert.True (justifiedText.GetRuneCount () <= maxWidth);
         Assert.True (justifiedText.GetColumns () <= maxWidth);
@@ -900,7 +900,7 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         bool preserveTrailingSpaces,
         IEnumerable<string> resultLines,
@@ -908,7 +908,7 @@ ssb
     )
     {
         Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset);
-        List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces);
+        List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap, preserveTrailingSpaces);
         Assert.Equal (list.Count, resultLines.Count ());
         Assert.Equal (resultLines, list);
         var wrappedText = string.Empty;
@@ -1336,7 +1336,7 @@ ssb
         Assert.NotEmpty (tf.GetLines ());
         Assert.False (tf.NeedsFormat); // get_Lines causes a Format
 
-        tf.Justification = Alignment.Centered;
+        tf.Alignment = Alignment.Centered;
         Assert.True (tf.NeedsFormat);
         Assert.NotEmpty (tf.GetLines ());
         Assert.False (tf.NeedsFormat); // get_Lines causes a Format
@@ -1348,18 +1348,18 @@ ssb
     [InlineData (null, 0, Alignment.Left, true, 1)]
     [InlineData ("", 0, Alignment.Left, false, 1)]
     [InlineData ("", 0, Alignment.Left, true, 1)]
-    public void Reformat_Invalid (string text, int maxWidth, Alignment Justification, bool wrap, int linesCount)
+    public void Reformat_Invalid (string text, int maxWidth, Alignment alignment, bool wrap, int linesCount)
     {
         if (maxWidth < 0)
         {
             Assert.Throws<ArgumentOutOfRangeException> (
                                                         () =>
-                                                            TextFormatter.Format (text, maxWidth, Justification, wrap)
+                                                            TextFormatter.Format (text, maxWidth, alignment, wrap)
                                                        );
         }
         else
         {
-            List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap);
+            List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap);
             Assert.NotEmpty (list);
             Assert.True (list.Count == linesCount);
             Assert.Equal (string.Empty, list [0]);
@@ -1385,7 +1385,7 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         int linesCount,
         bool stringEmpty,
@@ -1394,7 +1394,7 @@ ssb
     {
         Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset);
         int expectedClippedWidth = Math.Min (text.GetRuneCount (), maxWidth) + clipWidthOffset;
-        List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap);
+        List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap);
         Assert.NotEmpty (list);
         Assert.True (list.Count == linesCount);
 
@@ -1537,7 +1537,7 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         int linesCount,
         bool stringEmpty,
@@ -1549,7 +1549,7 @@ ssb
         List<string> list = TextFormatter.Format (
                                                   text,
                                                   maxWidth,
-                                                  Justification,
+                                                  alignment,
                                                   wrap,
                                                   false,
                                                   0,
@@ -1679,7 +1679,7 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         int linesCount,
         bool stringEmpty,
@@ -1691,7 +1691,7 @@ ssb
         List<string> list = TextFormatter.Format (
                                                   text,
                                                   maxWidth,
-                                                  Justification,
+                                                  alignment,
                                                   wrap,
                                                   false,
                                                   0,
@@ -1728,7 +1728,7 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         int linesCount,
         bool stringEmpty
@@ -1736,7 +1736,7 @@ ssb
     {
         Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset);
         int expectedClippedWidth = Math.Min (text.GetRuneCount (), maxWidth);
-        List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap);
+        List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap);
         Assert.NotEmpty (list);
         Assert.True (list.Count == linesCount);
 
@@ -1788,14 +1788,14 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         bool preserveTrailingSpaces,
         IEnumerable<string> resultLines
     )
     {
         Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset);
-        List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces);
+        List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap, preserveTrailingSpaces);
         Assert.Equal (list.Count, resultLines.Count ());
         Assert.Equal (resultLines, list);
     }
@@ -1823,14 +1823,14 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         bool preserveTrailingSpaces,
         IEnumerable<string> resultLines
     )
     {
         Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset);
-        List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces);
+        List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap, preserveTrailingSpaces);
         Assert.Equal (list.Count, resultLines.Count ());
         Assert.Equal (resultLines, list);
     }
@@ -1869,7 +1869,7 @@ ssb
         string text,
         int maxWidth,
         int widthOffset,
-        Alignment Justification,
+        Alignment alignment,
         bool wrap,
         bool preserveTrailingSpaces,
         bool stringEmpty,
@@ -1879,7 +1879,7 @@ ssb
     {
         Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset);
         int expectedClippedWidth = Math.Min (text.GetRuneCount (), maxWidth);
-        List<string> list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces);
+        List<string> list = TextFormatter.Format (text, maxWidth, alignment, wrap, preserveTrailingSpaces);
         Assert.NotEmpty (list);
         Assert.True (list.Count == resultLines.Count ());
 
@@ -3159,7 +3159,7 @@ ssb
         TextFormatter tf = new ()
         {
             Text = text,
-            Justification = Alignment.Left,
+            Alignment = Alignment.Left,
             AutoSize = autoSize,
         };
 
@@ -3196,7 +3196,7 @@ ssb
         TextFormatter tf = new ()
         {
             Text = text,
-            Justification = Alignment.Right,
+            Alignment = Alignment.Right,
             AutoSize = autoSize,
         };
 
@@ -3239,7 +3239,7 @@ ssb
         TextFormatter tf = new ()
         {
             Text = text,
-            Justification = Alignment.Centered,
+            Alignment = Alignment.Centered,
             AutoSize = autoSize,
         };
 
@@ -3284,7 +3284,7 @@ ssb
         TextFormatter tf = new ()
         {
             Text = text,
-            Justification = Alignment.Justified,
+            Alignment = Alignment.Justified,
             AutoSize = autoSize,
         };
 
@@ -3374,7 +3374,7 @@ Nice       Work")]
         TextFormatter tf = new ()
         {
             Text = text,
-            Justification = Alignment.Justified,
+            Alignment = Alignment.Justified,
             Size = new Size (width, height),
             MultiLine = true
         };
@@ -3426,7 +3426,7 @@ ek")]
         {
             Text = text,
             Direction = TextDirection.TopBottom_LeftRight,
-            VerticalJustification = Alignment.Justified,
+            VerticalAlignment = Alignment.Justified,
             Size = new Size (width, height),
             MultiLine = true
         };
@@ -3482,9 +3482,9 @@ ek")]
         TextFormatter tf = new ()
         {
             Text = text,
-            Justification = Alignment.Right,
+            Alignment = Alignment.Right,
             Direction = TextDirection.TopBottom_LeftRight,
-            VerticalJustification = Alignment.Bottom,
+            VerticalAlignment = Alignment.Bottom,
             AutoSize = autoSize,
         };
 
@@ -3624,7 +3624,7 @@ B")]
         {
             Text = text,
             Direction = TextDirection.TopBottom_LeftRight,
-            VerticalJustification = Alignment.Centered,
+            VerticalAlignment = Alignment.Centered,
             AutoSize = autoSize,
         };
 
@@ -3880,7 +3880,7 @@ B")]
     [SetupFakeDriver]
     [Theory]
 
-    // Horizontal with Justification.Top
+    // Horizontal with alignment.Top
     // LeftRight_TopBottom
     [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
 0 2 4**
@@ -4149,7 +4149,7 @@ B")]
 *******
 *******")]
 
-    // Horizontal with Justification.Bottom
+    // Horizontal with alignment.Bottom
     // LeftRight_TopBottom
     [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
 *******
@@ -4418,7 +4418,7 @@ B")]
 *******
 4  你 0")]
 
-    // Horizontal with Justification.Centered
+    // Horizontal with alignment.Centered
     // LeftRight_TopBottom
     [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
 *******
@@ -4687,7 +4687,7 @@ B")]
 *******
 *******")]
 
-    // Horizontal with Justification.Justified
+    // Horizontal with alignment.Justified
     // LeftRight_TopBottom
     [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
 0 2 4**
@@ -4956,7 +4956,7 @@ B")]
 *******
 *******")]
 
-    // Vertical with Justification.Left
+    // Vertical with alignment.Left
     // TopBottom_LeftRight
     [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
 0******
@@ -5225,7 +5225,7 @@ B")]
  ******
 0******")]
 
-    // Vertical with Justification.Right
+    // Vertical with alignment.Right
     // TopBottom_LeftRight
     [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
 ******0
@@ -5494,7 +5494,7 @@ B")]
 ***** *
 *****0*")]
 
-    // Vertical with Justification.Centered
+    // Vertical with alignment.Centered
     // TopBottom_LeftRight
     [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
 ***0***
@@ -5763,7 +5763,7 @@ B")]
 ** ****
 **0****")]
 
-    // Vertical with Justification.Justified
+    // Vertical with alignment.Justified
     // TopBottom_LeftRight
     [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
 0******
@@ -6032,12 +6032,12 @@ B")]
  ******
 0******")]
 
-    public void Draw_Text_Justification (string text, Alignment horizontalTextJustification, Alignment justification, TextDirection textDirection, string expectedText)
+    public void Draw_Text_Justification (string text, Alignment horizontalTextAlignment, Alignment alignment, TextDirection textDirection, string expectedText)
     {
         TextFormatter tf = new ()
         {
-            Justification = horizontalTextJustification,
-            VerticalJustification = justification,
+            Alignment = horizontalTextAlignment,
+            VerticalAlignment = alignment,
             Direction = textDirection,
             Size = new (7, 7),
             Text = text

+ 3 - 3
UnitTests/View/DrawTests.cs

@@ -332,14 +332,14 @@ public class DrawTests (ITestOutputHelper _output)
     [Fact]
     [AutoInitShutdown]
     [Trait ("Category", "Output")]
-    public void Colors_On_TextJustification_Right_And_Bottom ()
+    public void Colors_On_TextAlignment_Right_And_Bottom ()
     {
         var viewRight = new View
         {
             Text = "Test",
             Width = 6,
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             ColorScheme = Colors.ColorSchemes ["Base"]
         };
 
@@ -350,7 +350,7 @@ public class DrawTests (ITestOutputHelper _output)
             Y = 1,
             Width = 1,
             Height = 6,
-            VerticalTextJustification = Alignment.Bottom,
+            VerticalTextAlignment = Alignment.Bottom,
             ColorScheme = Colors.ColorSchemes ["Base"]
         };
         Toplevel top = new ();

+ 6 - 6
UnitTests/View/Layout/Dim.AutoTests.cs

@@ -681,11 +681,11 @@ public class DimAutoTests (ITestOutputHelper output)
         Assert.False (view.TextFormatter.AutoSize);
         Assert.Equal (Size.Empty, view.Frame.Size);
 
-        view.TextFormatter.Justification = Alignment.Justified;
+        view.TextFormatter.Alignment = Alignment.Justified;
         Assert.False (view.TextFormatter.AutoSize);
         Assert.Equal (Size.Empty, view.Frame.Size);
 
-        view.TextFormatter.VerticalJustification = Alignment.Centered;
+        view.TextFormatter.VerticalAlignment = Alignment.Centered;
         Assert.False (view.TextFormatter.AutoSize);
         Assert.Equal (Size.Empty, view.Frame.Size);
 
@@ -709,11 +709,11 @@ public class DimAutoTests (ITestOutputHelper output)
         Assert.False (view.TextFormatter.AutoSize);
         Assert.Equal (Size.Empty, view.Frame.Size);
 
-        view.TextJustification = Alignment.Justified;
+        view.TextAlignment = Alignment.Justified;
         Assert.False (view.TextFormatter.AutoSize);
         Assert.Equal (Size.Empty, view.Frame.Size);
 
-        view.VerticalTextJustification = Alignment.Centered;
+        view.VerticalTextAlignment = Alignment.Centered;
         Assert.False (view.TextFormatter.AutoSize);
         Assert.Equal (Size.Empty, view.Frame.Size);
 
@@ -738,7 +738,7 @@ public class DimAutoTests (ITestOutputHelper output)
         Assert.True (view.TextFormatter.AutoSize);
         Assert.NotEqual (Size.Empty, view.Frame.Size);
 
-        view.TextJustification = Alignment.Justified;
+        view.TextAlignment = Alignment.Justified;
         Assert.True (view.TextFormatter.AutoSize);
         Assert.NotEqual (Size.Empty, view.Frame.Size);
 
@@ -747,7 +747,7 @@ public class DimAutoTests (ITestOutputHelper output)
             Text = "_1234",
             Width = Dim.Auto ()
         };
-        view.VerticalTextJustification = Alignment.Centered;
+        view.VerticalTextAlignment = Alignment.Centered;
         Assert.True (view.TextFormatter.AutoSize);
         Assert.NotEqual (Size.Empty, view.Frame.Size);
 

+ 8 - 8
UnitTests/View/Text/AutoSizeTrueTests.cs

@@ -1788,7 +1788,7 @@ Y
     [AutoInitShutdown]
     [InlineData (true)]
     [InlineData (false)]
-    public void View_Draw_Horizontal_Simple_TextJustifications (bool autoSize)
+    public void View_Draw_Horizontal_Simple_TextAlignments (bool autoSize)
     {
         var text = "Hello World";
         var width = 20;
@@ -1811,7 +1811,7 @@ Y
             Y = 1,
             Width = width,
             Height = 1,
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
         };
 
         if (autoSize)
@@ -1826,7 +1826,7 @@ Y
             Y = 2,
             Width = width,
             Height = 1,
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
         };
         if (autoSize)
         {
@@ -1840,7 +1840,7 @@ Y
             Y = 3,
             Width = width,
             Height = 1,
-            TextJustification = Alignment.Justified,
+            TextAlignment = Alignment.Justified,
         };
         if (autoSize)
         {
@@ -1912,7 +1912,7 @@ Y
     [AutoInitShutdown]
     [InlineData (true)]
     [InlineData (false)]
-    public void View_Draw_Vertical_Simple_TextJustifications (bool autoSize)
+    public void View_Draw_Vertical_Simple_TextAlignments (bool autoSize)
     {
         var text = "Hello World";
         var height = 20;
@@ -1937,7 +1937,7 @@ Y
             Width = 1,
             Height = height,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Centered
+            VerticalTextAlignment = Alignment.Centered
         };
         if (autoSize)
         {
@@ -1952,7 +1952,7 @@ Y
             Width = 1,
             Height = height,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Bottom
+            VerticalTextAlignment = Alignment.Bottom
         };
         if (autoSize)
         {
@@ -1967,7 +1967,7 @@ Y
             Width = 1,
             Height = height,
             TextDirection = TextDirection.TopBottom_LeftRight,
-            VerticalTextJustification = Alignment.Justified
+            VerticalTextAlignment = Alignment.Justified
         };
         if (autoSize)
         {

+ 4 - 4
UnitTests/Views/ButtonTests.cs

@@ -155,14 +155,14 @@ public class ButtonTests (ITestOutputHelper output)
 
         Assert.Equal ($"{CM.Glyphs.LeftBracket}  {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
         Assert.False (btn.IsDefault);
-        Assert.Equal (Alignment.Centered, btn.TextJustification);
+        Assert.Equal (Alignment.Centered, btn.TextAlignment);
         Assert.Equal ('_', btn.HotKeySpecifier.Value);
         Assert.True (btn.CanFocus);
         Assert.Equal (new (0, 0, 4, 1), btn.Viewport);
         Assert.Equal (new (0, 0, 4, 1), btn.Frame);
         Assert.Equal ($"{CM.Glyphs.LeftBracket}  {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
         Assert.False (btn.IsDefault);
-        Assert.Equal (Alignment.Centered, btn.TextJustification);
+        Assert.Equal (Alignment.Centered, btn.TextAlignment);
         Assert.Equal ('_', btn.HotKeySpecifier.Value);
         Assert.True (btn.CanFocus);
         Assert.Equal (new (0, 0, 4, 1), btn.Viewport);
@@ -195,7 +195,7 @@ public class ButtonTests (ITestOutputHelper output)
                       btn.TextFormatter.Format ()
                      );
         Assert.True (btn.IsDefault);
-        Assert.Equal (Alignment.Centered, btn.TextJustification);
+        Assert.Equal (Alignment.Centered, btn.TextAlignment);
         Assert.True (btn.CanFocus);
 
         btn.SetRelativeLayout (new (100, 100));
@@ -222,7 +222,7 @@ public class ButtonTests (ITestOutputHelper output)
                       btn.TextFormatter.Format ()
                      );
         Assert.True (btn.IsDefault);
-        Assert.Equal (Alignment.Centered, btn.TextJustification);
+        Assert.Equal (Alignment.Centered, btn.TextAlignment);
         Assert.Equal ('_', btn.HotKeySpecifier.Value);
         Assert.True (btn.CanFocus);
 

+ 13 - 13
UnitTests/Views/CheckBoxTests.cs

@@ -244,14 +244,14 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextJustification_Centered ()
+    public void TextAlignment_Centered ()
     {
         var checkBox = new CheckBox
         {
             X = 1,
             Y = Pos.Center (),
             Text = "Check this out 你",
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 25
         };
         var win = new Window { Width = Dim.Fill (), Height = Dim.Fill (), Title = "Test Demo 你" };
@@ -262,7 +262,7 @@ public class CheckBoxTests
         Application.Begin (top);
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
-        Assert.Equal (Alignment.Centered, checkBox.TextJustification);
+        Assert.Equal (Alignment.Centered, checkBox.TextAlignment);
         Assert.Equal (new (1, 1, 25, 1), checkBox.Frame);
         Assert.Equal (_size25x1, checkBox.TextFormatter.Size);
 
@@ -294,14 +294,14 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextJustification_Justified ()
+    public void TextAlignment_Justified ()
     {
         var checkBox1 = new CheckBox
         {
             X = 1,
             Y = Pos.Center (),
             Text = "Check first out 你",
-            TextJustification = Alignment.Justified,
+            TextAlignment = Alignment.Justified,
             Width = 25
         };
 
@@ -310,7 +310,7 @@ public class CheckBoxTests
             X = 1,
             Y = Pos.Bottom (checkBox1),
             Text = "Check second out 你",
-            TextJustification = Alignment.Justified,
+            TextAlignment = Alignment.Justified,
             Width = 25
         };
         var win = new Window { Width = Dim.Fill (), Height = Dim.Fill (), Title = "Test Demo 你" };
@@ -321,9 +321,9 @@ public class CheckBoxTests
         Application.Begin (top);
         ((FakeDriver)Application.Driver).SetBufferSize (30, 6);
 
-        Assert.Equal (Alignment.Justified, checkBox1.TextJustification);
+        Assert.Equal (Alignment.Justified, checkBox1.TextAlignment);
         Assert.Equal (new (1, 1, 25, 1), checkBox1.Frame);
-        Assert.Equal (Alignment.Justified, checkBox2.TextJustification);
+        Assert.Equal (Alignment.Justified, checkBox2.TextAlignment);
         Assert.Equal (new (1, 2, 25, 1), checkBox2.Frame);
  
         var expected = @$"
@@ -361,7 +361,7 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextJustification_Left ()
+    public void TextAlignment_Left ()
     {
         var checkBox = new CheckBox
         {
@@ -378,7 +378,7 @@ public class CheckBoxTests
         Application.Begin (top);
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
-        Assert.Equal (Alignment.Left, checkBox.TextJustification);
+        Assert.Equal (Alignment.Left, checkBox.TextAlignment);
         Assert.Equal (new (1, 1, 25, 1), checkBox.Frame);
         Assert.Equal (_size25x1, checkBox.TextFormatter.Size);
 
@@ -410,14 +410,14 @@ public class CheckBoxTests
 
     [Fact]
     [AutoInitShutdown]
-    public void TextJustification_Right ()
+    public void TextAlignment_Right ()
     {
         var checkBox = new CheckBox
         {
             X = 1,
             Y = Pos.Center (),
             Text = "Check this out 你",
-            TextJustification = Alignment.Right,
+            TextAlignment = Alignment.Right,
             Width = 25
         };
         var win = new Window { Width = Dim.Fill (), Height = Dim.Fill (), Title = "Test Demo 你" };
@@ -428,7 +428,7 @@ public class CheckBoxTests
         Application.Begin (top);
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
-        Assert.Equal (Alignment.Right, checkBox.TextJustification);
+        Assert.Equal (Alignment.Right, checkBox.TextAlignment);
         Assert.Equal (new (1, 1, 25, 1), checkBox.Frame);
         Assert.Equal (_size25x1, checkBox.TextFormatter.Size);
 

+ 1 - 1
UnitTests/Views/LabelTests.cs

@@ -206,7 +206,7 @@ public class LabelTests
     {
         var label = new Label ();
         Assert.Equal (string.Empty, label.Text);
-        Assert.Equal (Alignment.Left, label.TextJustification);
+        Assert.Equal (Alignment.Left, label.TextAlignment);
         Assert.False (label.CanFocus);
         Assert.Equal (new Rectangle (0, 0, 0, 0), label.Frame);
         Assert.Equal (KeyCode.Null, label.HotKey);

+ 20 - 20
UnitTests/Views/TextValidateFieldTests.cs

@@ -10,7 +10,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ****
@@ -44,7 +44,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Left,
+            TextAlignment = Alignment.Left,
             Width = 30,
 
             //                                             ****
@@ -81,7 +81,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ****
@@ -115,7 +115,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             *
@@ -137,7 +137,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             *
@@ -161,7 +161,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ****
@@ -179,7 +179,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ****
@@ -196,7 +196,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ****
@@ -214,7 +214,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             *
@@ -233,7 +233,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             *
@@ -253,7 +253,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ** **
@@ -283,7 +283,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             *
@@ -308,7 +308,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Left,
+            TextAlignment = Alignment.Left,
             Width = 30,
 
             //                                             ****
@@ -338,7 +338,7 @@ public class TextValidateField_NET_Provider_Tests
 
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Left, Width = 30, Provider = new NetMaskedTextProvider ("--(0000)--")
+            TextAlignment = Alignment.Left, Width = 30, Provider = new NetMaskedTextProvider ("--(0000)--")
         };
 
         field.Provider.TextChanged += (sender, e) => wasTextChanged = true;
@@ -356,7 +356,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             *
@@ -381,7 +381,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Left,
+            TextAlignment = Alignment.Left,
             Width = 30,
 
             //                                             ****
@@ -400,7 +400,7 @@ public class TextValidateField_NET_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
 
             //                                             ****
@@ -540,7 +540,7 @@ public class TextValidateField_Regex_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
             Provider = new TextRegexProvider ("^[0-9][0-9][0-9]$") { ValidateOnInput = false }
         };
@@ -596,7 +596,7 @@ public class TextValidateField_Regex_Provider_Tests
 
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
             Provider = new TextRegexProvider ("^[0-9][0-9][0-9]$") { ValidateOnInput = false }
         };
@@ -616,7 +616,7 @@ public class TextValidateField_Regex_Provider_Tests
     {
         var field = new TextValidateField
         {
-            TextJustification = Alignment.Centered,
+            TextAlignment = Alignment.Centered,
             Width = 20,
             Provider = new TextRegexProvider ("^[0-9][0-9][0-9]$") { ValidateOnInput = false }
         };

+ 2 - 2
UnitTests/Views/ToplevelTests.cs

@@ -1482,8 +1482,8 @@ public class ToplevelTests
                         Y = Pos.Center (),
                         Width = Dim.Fill (),
                         Height = Dim.Fill (),
-                        TextJustification = Alignment.Centered,
-                        VerticalTextJustification = Alignment.Centered,
+                        TextAlignment = Alignment.Centered,
+                        VerticalTextAlignment = Alignment.Centered,
                         Text = "Test"
                     }
                    );

+ 1 - 1
docfx/docs/layout.md

@@ -66,7 +66,7 @@ The [Pos](~/api/Terminal.Gui.Pos.yml) is the type of `View.X` and `View.Y` and s
 * Anchored from the end of the dimension - `Pos.AnchorEnd()`.
 * Centered, using `Pos.Center()`.
 * The `Pos.Left(otherView)`, `Pos.Top(otherView)`, `Pos.Bottom(otherView)`, `Pos.Right(otherView)` positions of another view.
-* Justified (left, right, center, etc...) with other views - `Pos.Justify(Justification)`.
+* Aligned (left, right, center, etc...) with other views - `Pos.Justify(Justification)`.
 
 All `Pos` coordinates are relative to the Superview's content area.
 

+ 3 - 5
docfx/docs/migratingfromv1.md

@@ -235,12 +235,10 @@ Replace references to to nested types with the new standalone version
 
 ## View and Text Alignment is now Justification
 
-In v1, both `TextAlignment` and `VerticalTextAlignment` enums were used to align text in views. In v2, these enums have been replaced with the `Justification` enum. The `View.TextJustification` property controls horizontal text alignment, and the `View.VerticalTextAlignment` property controls vertical text alignment.
+In v1, both `TextAlignment` and `VerticalTextAlignment` enums were used to align text in views. In v2, these enums have been replaced with the `Alignment` enum. The `View.TextAlignment` property controls horizontal text alignment, and the `View.VerticalTextAlignment` property controls vertical text alignment.
 
-v2 now supports `Pos.Justify` which enables views to be justified within their superview. 
+v2 now supports `Pos.Align` which enables views to be justified within their superview. 
 
 ### How to Fix
 
-* Replace `TextAlignment` with `Justification` 
-* Replace `VerticalTextAlignment` with `Justification`. `Middle` is now `Center`. 
-* Update any code that used `View.TextAlignment` or `View.VerticalTextAlignment` to justify text in views.
+* Replace `VerticalAlignment.Middle` is now `Alignment.Center`. 

+ 1 - 1
docfx/docs/newinv2.md

@@ -27,7 +27,7 @@ The entire library has been reviewed and simplified. As a result, the API is mor
 * New! *Built-in Scrolling/Virtual Content Area* - In v1, to have a view a user could scroll required either a bespoke scrolling implementation, inheriting from `ScrollView`, or managing the complexity of `ScrollBarView` directly. In v2, the base-View class supports scrolling inherently. The area of a view visible to the user at a given moment was previously a rectangle called `Bounds`. `Bounds.Location` was always `Point.Empty`. In v2 the visible area is a rectangle called `Viewport` which is a protal into the Views content, which can be bigger (or smaller) than the area visible to the user. Causing a view to scroll is as simple as changing `View.Viewport.Location`. The View's content described by `View.ContentSize`. See [Layout](layout.md) for details.
 * New! *`Dim.Auto`* - Automatically sizes the view to fitthe view's Text, SubViews, or ContentArea.
 * Improved! *`Pos.AnchorEnd ()`* - New to v2 is `Pos.AnchorEnd ()` (with no parameters) which allows a view to be anchored to the right or bottom of the Superview. 
-* New! *`Pos.Justify ()`* - Justifies a set of views horizontally or vertically (left, rigth, center, etc...).
+* New! *`Pos.Align ()`* - Aligns a set of views horizontally or vertically (left, rigth, center, etc...).
 * ...	
 
 ## New and Improved Built-in Views