Browse Source

Removed LayoutStyle

Tig 1 year ago
parent
commit
24ca95fd5e
37 changed files with 159 additions and 469 deletions
  1. 0 3
      Terminal.Gui/Application.cs
  2. 1 1
      Terminal.Gui/View/Layout/Dim.cs
  3. 0 38
      Terminal.Gui/View/Layout/LayoutStyle.cs
  4. 10 66
      Terminal.Gui/View/Layout/ViewLayout.cs
  5. 2 19
      Terminal.Gui/View/View.cs
  6. 0 5
      Terminal.Gui/View/ViewContent.cs
  7. 2 2
      Terminal.Gui/Views/Button.cs
  8. 1 2
      Terminal.Gui/Views/CheckBox.cs
  9. 2 2
      Terminal.Gui/Views/DateField.cs
  10. 3 5
      Terminal.Gui/Views/Dialog.cs
  11. 2 3
      Terminal.Gui/Views/FrameView.cs
  12. 2 2
      Terminal.Gui/Views/HexView.cs
  13. 1 2
      Terminal.Gui/Views/RadioGroup.cs
  14. 2 4
      Terminal.Gui/Views/ScrollBarView.cs
  15. 1 2
      Terminal.Gui/Views/ScrollView.cs
  16. 1 1
      Terminal.Gui/Views/TabView.cs
  17. 2 2
      Terminal.Gui/Views/TableView/TableView.cs
  18. 1 2
      Terminal.Gui/Views/TextField.cs
  19. 1 2
      Terminal.Gui/Views/TextValidateField.cs
  20. 1 1
      Terminal.Gui/Views/TimeField.cs
  21. 2 4
      Terminal.Gui/Views/Toplevel.cs
  22. 1 2
      Terminal.Gui/Views/Window.cs
  23. 1 2
      Terminal.Gui/Views/Wizard/Wizard.cs
  24. 1 2
      Terminal.Gui/Views/Wizard/WizardStep.cs
  25. 85 87
      UICatalog/Scenarios/AllViewsTester.cs
  26. 2 20
      UnitTests/UICatalog/ScenarioTests.cs
  27. 28 65
      UnitTests/View/Layout/AbsoluteLayoutTests.cs
  28. 0 87
      UnitTests/View/Layout/Dim.Tests.cs
  29. 0 6
      UnitTests/View/Layout/FrameTests.cs
  30. 0 2
      UnitTests/View/Layout/ViewportTests.cs
  31. 0 7
      UnitTests/View/ViewTests.cs
  32. 0 2
      UnitTests/Views/ScrollViewTests.cs
  33. 0 14
      UnitTests/Views/WindowTests.cs
  34. 1 1
      docfx/docs/View.md
  35. 1 1
      docfx/docs/index.md
  36. 0 2
      docfx/docs/layout.md
  37. 2 1
      docfx/docs/migratingfromv1.md

+ 0 - 3
Terminal.Gui/Application.cs

@@ -526,11 +526,8 @@ public static partial class Application
             MoveCurrent (Current);
         }
 
-        //if (Toplevel.LayoutStyle == LayoutStyle.Computed) {
         toplevel.SetRelativeLayout (Driver.Screen.Size);
 
-        //}
-
         // BUGBUG: This call is likely not needed.
         toplevel.LayoutSubviews ();
         toplevel.PositionToplevels ();

+ 1 - 1
Terminal.Gui/View/Layout/Dim.cs

@@ -7,7 +7,7 @@ namespace Terminal.Gui;
 ///     <para>
 ///         A Dim object describes the dimensions of a <see cref="View"/>. Dim is the type of the
 ///         <see cref="View.Width"/> and <see cref="View.Height"/> properties of <see cref="View"/>. Dim objects enable
-///         Computed Layout (see <see cref="LayoutStyle.Computed"/>) to automatically manage the dimensions of a view.
+///         automatic management of the dimensions of a view.
 ///     </para>
 ///     <para>
 ///         Integer values are implicitly convertible to an absolute <see cref="Dim"/>. These objects are created using

+ 0 - 38
Terminal.Gui/View/Layout/LayoutStyle.cs

@@ -1,38 +0,0 @@
-using Terminal.Gui.Analyzers.Internal.Attributes;
-
-namespace Terminal.Gui;
-
-/// <summary>
-///     <para>Indicates the LayoutStyle for the <see cref="View"/>.</para>
-///     <para>
-///         If Absolute, the <see cref="View.X"/>, <see cref="View.Y"/>, <see cref="View.Width"/>, and
-///         <see cref="View.Height"/> objects are all absolute values and are not relative. The position and size of the
-///         view is described by <see cref="View.Frame"/>.
-///     </para>
-///     <para>
-///         If Computed, one or more of the <see cref="View.X"/>, <see cref="View.Y"/>, <see cref="View.Width"/>, or
-///         <see cref="View.Height"/> objects are relative to the <see cref="View.SuperView"/> and are computed at layout
-///         time.
-///     </para>
-/// </summary>
-[GenerateEnumExtensionMethods]
-public enum LayoutStyle
-{
-    /// <summary>
-    ///     Indicates the <see cref="View.X"/>, <see cref="View.Y"/>, <see cref="View.Width"/>, and
-    ///     <see cref="View.Height"/> objects are all absolute values and are not relative. The position and size of the view
-    ///     is described by <see cref="View.Frame"/>.
-    /// </summary>
-    Absolute,
-
-    /// <summary>
-    ///     Indicates one or more of the <see cref="View.X"/>, <see cref="View.Y"/>, <see cref="View.Width"/>, or
-    ///     <see cref="View.Height"/>
-    ///     objects are relative to the <see cref="View.SuperView"/> and are computed at layout time.  The position and size of
-    ///     the
-    ///     view
-    ///     will be computed based on these objects at layout time. <see cref="View.Frame"/> will provide the absolute computed
-    ///     values.
-    /// </summary>
-    Computed
-}

+ 10 - 66
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -20,7 +20,6 @@ public partial class View
     ///     <para>
     ///         Setting Frame will set <see cref="X"/>, <see cref="Y"/>, <see cref="Width"/>, and <see cref="Height"/> to the
     ///         values of the corresponding properties of the <paramref name="value"/> parameter.
-    ///         This causes <see cref="LayoutStyle"/> to be <see cref="LayoutStyle.Absolute"/>.
     ///     </para>
     ///     <para>
     ///         Altering the Frame will eventually (when the view hierarchy is next laid out via  see
@@ -41,8 +40,7 @@ public partial class View
 
             SetFrame (value with { Width = Math.Max (value.Width, 0), Height = Math.Max (value.Height, 0) });
 
-            // If Frame gets set, by definition, the View is now LayoutStyle.Absolute, so
-            // set all Pos/Dim to Absolute values.
+            // If Frame gets set, set all Pos/Dim to Absolute values.
             _x = _frame.X;
             _y = _frame.Y;
             _width = _frame.Width;
@@ -148,8 +146,7 @@ public partial class View
     ///         <see cref="LayoutSubview(View, Size)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
-    ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
-    ///         <see cref="PosAbsolute"/> the <see cref="LayoutStyle"/> will change to <see cref="LayoutStyle.Computed"/>.
+    ///         Changing this property will cause <see cref="Frame"/> to be updated.
     ///     </para>
     ///     <para>The default value is <c>Pos.At (0)</c>.</para>
     /// </remarks>
@@ -187,8 +184,7 @@ public partial class View
     ///         <see cref="LayoutSubview(View, Size)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
-    ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
-    ///         <see cref="PosAbsolute"/> the <see cref="LayoutStyle"/> will change to <see cref="LayoutStyle.Computed"/>.
+    ///         Changing this property will cause <see cref="Frame"/> to be updated.
     ///     </para>
     ///     <para>The default value is <c>Pos.At (0)</c>.</para>
     /// </remarks>
@@ -226,8 +222,7 @@ public partial class View
     ///         <see cref="LayoutSubview(View, Size)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
-    ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
-    ///         <see cref="DimAbsolute"/> the <see cref="LayoutStyle"/> will change to <see cref="LayoutStyle.Computed"/>.
+    ///         Changing this property will cause <see cref="Frame"/> to be updated.
     ///     </para>
     ///     <para>The default value is <c>Dim.Sized (0)</c>.</para>
     /// </remarks>
@@ -272,8 +267,7 @@ public partial class View
     ///         <see cref="LayoutSubview(View, Size)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
-    ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
-    ///         <see cref="DimAbsolute"/> the <see cref="LayoutStyle"/> will change to <see cref="LayoutStyle.Computed"/>.
+    ///         Changing this property will cause <see cref="Frame"/> to be updated.
     ///     </para>
     ///     <para>The default value is <c>Dim.Sized (0)</c>.</para>
     /// </remarks>
@@ -303,55 +297,6 @@ public partial class View
 
     #region Layout Engine
 
-
-    // @tig Notes on layout flow. Ignore for now.
-    // BeginLayout
-    //   If !LayoutNeeded return
-    //   If !SizeNeeded return
-    //   Call OnLayoutStarted
-    //      Views and subviews can update things
-    //   
-
-
-    // EndLayout
-
-    /// <summary>
-    ///     Controls how the View's <see cref="Frame"/> is computed during <see cref="LayoutSubviews"/>. If the style is
-    ///     set to <see cref="LayoutStyle.Absolute"/>, LayoutSubviews does not change the <see cref="Frame"/>. If the style is
-    ///     <see cref="LayoutStyle.Computed"/> the <see cref="Frame"/> is updated using the <see cref="X"/>, <see cref="Y"/>,
-    ///     <see cref="Width"/>, and <see cref="Height"/> properties.
-    /// </summary>
-    /// <remarks>
-    ///     <para>
-    ///         Setting this property to <see cref="LayoutStyle.Absolute"/> will cause <see cref="Frame"/> to determine the
-    ///         size and position of the view. <see cref="X"/> and <see cref="Y"/> will be set to <see cref="DimAbsolute"/>
-    ///         using <see cref="Frame"/>.
-    ///     </para>
-    ///     <para>
-    ///         Setting this property to <see cref="LayoutStyle.Computed"/> will cause the view to use the
-    ///         <see cref="LayoutSubviews"/> method to size and position of the view. If either of the <see cref="X"/> and
-    ///         <see cref="Y"/> properties are `null` they will be set to <see cref="PosAbsolute"/> using the current value
-    ///         of <see cref="Frame"/>. If either of the <see cref="Width"/> and <see cref="Height"/> properties are `null`
-    ///         they will be set to <see cref="DimAbsolute"/> using <see cref="Frame"/>.
-    ///     </para>
-    /// </remarks>
-    /// <value>The layout style.</value>
-    public LayoutStyle LayoutStyle
-    {
-        get
-        {
-            if (_x is PosAbsolute
-                && _y is PosAbsolute
-                && _width is DimAbsolute
-                && _height is DimAbsolute)
-            {
-                return LayoutStyle.Absolute;
-            }
-
-            return LayoutStyle.Computed;
-        }
-    }
-
     #endregion Layout Engine
 
     /// <summary>
@@ -796,8 +741,7 @@ public partial class View
 
         if (Frame != newFrame)
         {
-            // Set the frame. Do NOT use `Frame` as it overwrites X, Y, Width, and Height, making
-            // the view LayoutStyle.Absolute.
+            // Set the frame. Do NOT use `Frame` as it overwrites X, Y, Width, and Height
             SetFrame (newFrame);
 
             if (_x is PosAbsolute)
@@ -836,10 +780,10 @@ public partial class View
         {
             nNodes.Add (v);
 
-            if (v.LayoutStyle != LayoutStyle.Computed)
-            {
-                continue;
-            }
+            //if (v.LayoutStyle != LayoutStyle.Computed)
+            //{
+            //    continue;
+            //}
 
             CollectPos (v.X, v, ref nNodes, ref nEdges);
             CollectPos (v.Y, v, ref nNodes, ref nEdges);

+ 2 - 19
Terminal.Gui/View/View.cs

@@ -43,13 +43,6 @@ namespace Terminal.Gui;
 ///         more subviews, can respond to user input and render themselves on the screen.
 ///     </para>
 ///     <para>
-///         View supports two layout styles: <see cref="LayoutStyle.Absolute"/> or <see cref="LayoutStyle.Computed"/>.
-///         The style is determined by the values of <see cref="X"/>, <see cref="Y"/>, <see cref="Width"/>, and
-///         <see cref="Height"/>. If any of these is set to non-absolute <see cref="Pos"/> or <see cref="Dim"/> object,
-///         then the layout style is <see cref="LayoutStyle.Computed"/>. Otherwise it is <see cref="LayoutStyle.Absolute"/>
-///         .
-///     </para>
-///     <para>
 ///         To create a View using Absolute layout, call a constructor that takes a Rect parameter to specify the
 ///         absolute position and size or simply set <see cref="View.Frame "/>). To create a View using Computed layout use
 ///         a constructor that does not take a Rect parameter and set the X, Y, Width and Height properties on the view to
@@ -79,9 +72,7 @@ namespace Terminal.Gui;
 ///         To flag the entire view for redraw call <see cref="SetNeedsDisplay()"/>.
 ///     </para>
 ///     <para>
-///         The <see cref="LayoutSubviews"/> method is invoked when the size or layout of a view has changed. The default
-///         processing system will keep the size and dimensions for views that use the <see cref="LayoutStyle.Absolute"/>,
-///         and will recompute the Adornments for the views that use <see cref="LayoutStyle.Computed"/>.
+///         The <see cref="LayoutSubviews"/> method is invoked when the size or layout of a view has changed.
 ///     </para>
 ///     <para>
 ///         Views have a <see cref="ColorScheme"/> property that defines the default colors that subviews should use for
@@ -127,15 +118,7 @@ public partial class View : Responder, ISupportInitializeNotification
     /// <remarks>
     ///     <para>
     ///         Use <see cref="X"/>, <see cref="Y"/>, <see cref="Width"/>, and <see cref="Height"/> properties to dynamically
-    ///         control the size and location of the view. The <see cref="View"/> will be created using
-    ///         <see cref="LayoutStyle.Absolute"/> coordinates. The initial size ( <see cref="View.Frame"/>) will be adjusted
-    ///         to fit the contents of <see cref="Text"/>, including newlines ('\n') for multiple lines.
-    ///     </para>
-    ///     <para>If <see cref="Height"/> is greater than one, word wrapping is provided.</para>
-    ///     <para>
-    ///         This constructor initialize a View with a <see cref="LayoutStyle"/> of <see cref="LayoutStyle.Absolute"/>.
-    ///         Use <see cref="X"/>, <see cref="Y"/>, <see cref="Width"/>, and <see cref="Height"/> properties to dynamically
-    ///         control the size and location of the view, changing it to <see cref="LayoutStyle.Computed"/>.
+    ///         control the size and location of the view.
     ///     </para>
     /// </remarks>
     public View ()

+ 0 - 5
Terminal.Gui/View/ViewContent.cs

@@ -183,11 +183,6 @@ public partial class View
     ///         The <see cref="ViewportSettings"/> property controls how scrolling is handled. 
     ///     </para>
     ///     <para>
-    ///         If <see cref="LayoutStyle"/> is <see cref="LayoutStyle.Computed"/> the value of Viewport is indeterminate until
-    ///         the view has been initialized ( <see cref="IsInitialized"/> is true) and <see cref="LayoutSubviews"/> has been
-    ///         called.
-    ///     </para>
-    ///     <para>
     ///         Updates to the Viewport Size updates <see cref="Frame"/>, and has the same impact as updating the
     ///         <see cref="Frame"/>.
     ///     </para>

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

@@ -33,8 +33,8 @@ public class Button : View
     private readonly Rune _rightDefault;
     private bool _isDefault;
 
-    /// <summary>Initializes a new instance of <see cref="Button"/> using <see cref="LayoutStyle.Computed"/> layout.</summary>
-    /// <remarks>The width of the <see cref="Button"/> is computed based on the text length. The height will always be 1.</remarks>
+    /// <summary>Initializes a new instance of <see cref="Button"/>.</summary>
+    /// <remarks>The width and height of the <see cref="Button"/> is computed based on the text.</remarks>
     public Button ()
     {
         TextAlignment = Alignment.Center;

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

@@ -11,8 +11,7 @@ public class CheckBox : View
     private bool? _checked = false;
 
     /// <summary>
-    ///     Initializes a new instance of <see cref="CheckBox"/> based on the given text, using
-    ///     <see cref="LayoutStyle.Computed"/> layout.
+    ///     Initializes a new instance of <see cref="CheckBox"/>.
     /// </summary>
     public CheckBox ()
     {

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

@@ -21,10 +21,10 @@ public class DateField : TextField
     private string _format;
     private string _separator;
 
-    /// <summary>Initializes a new instance of <see cref="DateField"/> using <see cref="LayoutStyle.Computed"/> layout.</summary>
+    /// <summary>Initializes a new instance of <see cref="DateField"/>.</summary>
     public DateField () : this (DateTime.MinValue) { }
 
-    /// <summary>Initializes a new instance of <see cref="DateField"/> using <see cref="LayoutStyle.Computed"/> layout.</summary>
+    /// <summary>Initializes a new instance of <see cref="DateField"/>.</summary>
     /// <param name="date"></param>
     public DateField (DateTime date)
     {

+ 3 - 5
Terminal.Gui/Views/Dialog.cs

@@ -55,13 +55,11 @@ public class Dialog : Window
     private readonly List<Button> _buttons = new ();
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Dialog"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     positioning with no <see cref="Button"/>s.
+    ///     Initializes a new instance of the <see cref="Dialog"/> class.
     /// </summary>
     /// <remarks>
-    ///     By default, <see cref="View.X"/> and <see cref="View.Y"/> are set to <c>Pos.Center ()</c> and
-    ///     <see cref="View.Width"/> and <see cref="View.Height"/> are set to <c>Width = Dim.Percent (85)</c>, centering the
-    ///     Dialog vertically and horizontally.
+    ///     By default, <see cref="View.X"/>, <see cref="View.Y"/>, <see cref="View.Width"/>, and <see cref="View.Height"/> are set
+    ///     such that the dialog will be centered and no larger than 90% of the container's width and height.
     /// </remarks>
     public Dialog ()
     {

+ 2 - 3
Terminal.Gui/Views/FrameView.cs

@@ -3,13 +3,12 @@
 namespace Terminal.Gui;
 
 /// <summary>
-///     The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in
-///     Windows.
+///     The FrameView is a container View with a border around it. 
 /// </summary>
 public class FrameView : View
 {
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Gui.FrameView"/> class using <see cref="LayoutStyle.Computed"/>
+    ///     Initializes a new instance of the <see cref="Gui.FrameView"/> class.
     ///     layout.
     /// </summary>
     public FrameView ()

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

@@ -38,7 +38,7 @@ public class HexView : View
     private static readonly Rune SpaceCharRune = new (' ');
     private static readonly Rune PeriodCharRune = new ('.');
 
-    /// <summary>Initializes a <see cref="HexView"/> class using <see cref="LayoutStyle.Computed"/> layout.</summary>
+    /// <summary>Initializes a <see cref="HexView"/> class.</summary>
     /// <param name="source">
     ///     The <see cref="Stream"/> to view and edit as hex, this <see cref="Stream"/> must support seeking,
     ///     or an exception will be thrown.
@@ -98,7 +98,7 @@ public class HexView : View
         LayoutComplete += HexView_LayoutComplete;
     }
 
-    /// <summary>Initializes a <see cref="HexView"/> class using <see cref="LayoutStyle.Computed"/> layout.</summary>
+    /// <summary>Initializes a <see cref="HexView"/> class.</summary>
     public HexView () : this (new MemoryStream ()) { }
 
     /// <summary>

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

@@ -11,8 +11,7 @@ public class RadioGroup : View
     private int _selected;
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="RadioGroup"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     layout.
+    ///     Initializes a new instance of the <see cref="RadioGroup"/> class.
     /// </summary>
     public RadioGroup ()
     {

+ 2 - 4
Terminal.Gui/Views/ScrollBarView.cs

@@ -33,8 +33,7 @@ public class ScrollBarView : View
     private bool _vertical;
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Gui.ScrollBarView"/> class using
-    ///     <see cref="LayoutStyle.Computed"/> layout.
+    ///     Initializes a new instance of the <see cref="Gui.ScrollBarView"/> class.
     /// </summary>
     public ScrollBarView ()
     {
@@ -46,8 +45,7 @@ public class ScrollBarView : View
     }
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Gui.ScrollBarView"/> class using
-    ///     <see cref="LayoutStyle.Computed"/> layout.
+    ///     Initializes a new instance of the <see cref="Gui.ScrollBarView"/> class.
     /// </summary>
     /// <param name="host">The view that will host this scrollbar.</param>
     /// <param name="isVertical">If set to <c>true</c> this is a vertical scrollbar, otherwise, the scrollbar is horizontal.</param>

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

@@ -38,8 +38,7 @@ public class ScrollView : View
     private bool _showVerticalScrollIndicator;
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Gui.ScrollView"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     positioning.
+    ///     Initializes a new instance of the <see cref="Gui.ScrollView"/> class.
     /// </summary>
     public ScrollView ()
     {

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

@@ -21,7 +21,7 @@ public class TabView : View
     private TabToRender [] _tabLocations;
     private int _tabScrollOffset;
 
-    /// <summary>Initializes a <see cref="TabView"/> class using <see cref="LayoutStyle.Computed"/> layout.</summary>
+    /// <summary>Initializes a <see cref="TabView"/> class.</summary>
     public TabView ()
     {
         CanFocus = true;

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

@@ -37,12 +37,12 @@ public class TableView : View
     private TableStyle style = new ();
     private ITableSource table;
 
-    /// <summary>Initializes a <see cref="TableView"/> class using <see cref="LayoutStyle.Computed"/> layout.</summary>
+    /// <summary>Initializes a <see cref="TableView"/> class.</summary>
     /// <param name="table">The table to display in the control</param>
     public TableView (ITableSource table) : this () { Table = table; }
 
     /// <summary>
-    ///     Initializes a <see cref="TableView"/> class using <see cref="LayoutStyle.Computed"/> layout. Set the
+    ///     Initializes a <see cref="TableView"/> class. Set the
     ///     <see cref="Table"/> property to begin editing
     /// </summary>
     public TableView ()

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

@@ -21,8 +21,7 @@ public class TextField : View
     private List<Rune> _text;
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     positioning.
+    ///     Initializes a new instance of the <see cref="TextField"/> class.
     /// </summary>
     public TextField ()
     {

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

@@ -392,8 +392,7 @@ namespace Terminal.Gui
         private ITextValidateProvider _provider;
 
         /// <summary>
-        ///     Initializes a new instance of the <see cref="TextValidateField"/> class using
-        ///     <see cref="LayoutStyle.Computed"/> positioning.
+        ///     Initializes a new instance of the <see cref="TextValidateField"/> class.
         /// </summary>
         public TextValidateField ()
         {

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

@@ -21,7 +21,7 @@ public class TimeField : TextField
     private bool _isShort;
     private TimeSpan _time;
 
-    /// <summary>Initializes a new instance of <see cref="TimeField"/> using <see cref="LayoutStyle.Computed"/> positioning.</summary>
+    /// <summary>Initializes a new instance of <see cref="TimeField"/>.</summary>
     public TimeField ()
     {
         CultureInfo cultureInfo = CultureInfo.CurrentCulture;

+ 2 - 4
Terminal.Gui/Views/Toplevel.cs

@@ -23,7 +23,7 @@ namespace Terminal.Gui;
 public partial class Toplevel : View
 {
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Toplevel"/> class with <see cref="LayoutStyle.Computed"/> layout,
+    ///     Initializes a new instance of the <see cref="Toplevel"/> class,
     ///     defaulting to full screen. The <see cref="View.Width"/> and <see cref="View.Height"/> properties will be set to the
     ///     dimensions of the terminal using <see cref="Dim.Fill"/>.
     /// </summary>
@@ -397,9 +397,7 @@ public partial class Toplevel : View
         }
 
         if ((superView != top || top?.SuperView is { } || (top != Application.Top && top.Modal) || (top?.SuperView is null && top.IsOverlapped))
-
-            // BUGBUG: Prevously PositionToplevel required LayotuStyle.Computed
-            && (top.Frame.X + top.Frame.Width > maxWidth || ny > top.Frame.Y) /*&& top.LayoutStyle == LayoutStyle.Computed*/)
+            && (top.Frame.X + top.Frame.Width > maxWidth || ny > top.Frame.Y))
         {
             if ((top.X is null || top.X is PosAbsolute) && top.Frame.X != nx)
             {

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

@@ -15,8 +15,7 @@ namespace Terminal.Gui;
 public class Window : Toplevel
 {
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Window"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     positioning.
+    ///     Initializes a new instance of the <see cref="Window"/> class.
     /// </summary>
     public Window ()
     {

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

@@ -57,8 +57,7 @@ public class Wizard : Dialog
     private string _wizardTitle = string.Empty;
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Wizard"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     positioning.
+    ///     Initializes a new instance of the <see cref="Wizard"/> class.
     /// </summary>
     /// <remarks>
     ///     The Wizard will be vertically and horizontally centered in the container. After initialization use <c>X</c>,

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

@@ -40,8 +40,7 @@ public class WizardStep : FrameView
     private readonly TextView _helpTextView = new ();
 
     /// <summary>
-    ///     Initializes a new instance of the <see cref="Wizard"/> class using <see cref="LayoutStyle.Computed"/>
-    ///     positioning.
+    ///     Initializes a new instance of the <see cref="Wizard"/> class.
     /// </summary>
     public WizardStep ()
     {

+ 85 - 87
UICatalog/Scenarios/AllViewsTester.cs

@@ -88,7 +88,7 @@ public class AllViewsTester : Scenario
                        .Select (t => new KeyValuePair<string, Type> (t.Name, t))
                        .ToDictionary (t => t.Key, t => t.Value);
 
-        _leftPane = new FrameView
+        _leftPane = new()
         {
             X = 0,
             Y = 0,
@@ -99,7 +99,7 @@ public class AllViewsTester : Scenario
             Title = "Classes"
         };
 
-        _classListView = new ListView
+        _classListView = new()
         {
             X = 0,
             Y = 0,
@@ -128,7 +128,7 @@ public class AllViewsTester : Scenario
                                               };
         _leftPane.Add (_classListView);
 
-        _settingsPane = new FrameView
+        _settingsPane = new()
         {
             X = Pos.Right (_leftPane),
             Y = 0, // for menu
@@ -141,7 +141,7 @@ public class AllViewsTester : Scenario
 
         string [] radioItems = { "_Percent(x)", "_AnchorEnd", "_Center", "A_bsolute(x)" };
 
-        _locationFrame = new FrameView
+        _locationFrame = new()
         {
             X = 0,
             Y = 0,
@@ -153,9 +153,9 @@ public class AllViewsTester : Scenario
 
         var label = new Label { X = 0, Y = 0, Text = "X:" };
         _locationFrame.Add (label);
-        _xRadioGroup = new RadioGroup { X = 0, Y = Pos.Bottom (label), RadioLabels = radioItems };
+        _xRadioGroup = new() { X = 0, Y = Pos.Bottom (label), RadioLabels = radioItems };
         _xRadioGroup.SelectedItemChanged += (s, selected) => DimPosChanged (_curView);
-        _xText = new TextField { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_xVal}" };
+        _xText = new() { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_xVal}" };
 
         _xText.Accept += (s, args) =>
                          {
@@ -172,9 +172,9 @@ public class AllViewsTester : Scenario
         _locationFrame.Add (_xRadioGroup);
 
         radioItems = new [] { "P_ercent(y)", "A_nchorEnd", "C_enter", "Absolute(_y)" };
-        label = new Label { X = Pos.Right (_xRadioGroup) + 1, Y = 0, Text = "Y:" };
+        label = new() { X = Pos.Right (_xRadioGroup) + 1, Y = 0, Text = "Y:" };
         _locationFrame.Add (label);
-        _yText = new TextField { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_yVal}" };
+        _yText = new() { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_yVal}" };
 
         _yText.Accept += (s, args) =>
                          {
@@ -187,11 +187,11 @@ public class AllViewsTester : Scenario
                              { }
                          };
         _locationFrame.Add (_yText);
-        _yRadioGroup = new RadioGroup { X = Pos.X (label), Y = Pos.Bottom (label), RadioLabels = radioItems };
+        _yRadioGroup = new() { X = Pos.X (label), Y = Pos.Bottom (label), RadioLabels = radioItems };
         _yRadioGroup.SelectedItemChanged += (s, selected) => DimPosChanged (_curView);
         _locationFrame.Add (_yRadioGroup);
 
-        _sizeFrame = new FrameView
+        _sizeFrame = new()
         {
             X = Pos.Right (_locationFrame),
             Y = Pos.Y (_locationFrame),
@@ -201,42 +201,42 @@ public class AllViewsTester : Scenario
         };
 
         radioItems = new [] { "Auto", "_Percent(width)", "_Fill(width)", "A_bsolute(width)" };
-        label = new Label { X = 0, Y = 0, Text = "Width:" };
+        label = new() { X = 0, Y = 0, Text = "Width:" };
         _sizeFrame.Add (label);
-        _wRadioGroup = new RadioGroup { X = 0, Y = Pos.Bottom (label), RadioLabels = radioItems };
+        _wRadioGroup = new() { X = 0, Y = Pos.Bottom (label), RadioLabels = radioItems };
         _wRadioGroup.SelectedItemChanged += (s, selected) => DimPosChanged (_curView);
-        _wText = new TextField { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_wVal}" };
+        _wText = new() { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_wVal}" };
 
         _wText.Accept += (s, args) =>
-                              {
-                                  try
-                                  {
-                                      switch (_wRadioGroup.SelectedItem)
-                                      {
-                                          case 1:
-                                              _wVal = Math.Min (int.Parse (_wText.Text), 100);
-
-                                              break;
-                                          case 0:
-                                          case 2:
-                                          case 3:
-                                              _wVal = int.Parse (_wText.Text);
-
-                                              break;
-                                      }
-
-                                      DimPosChanged (_curView);
-                                  }
-                                  catch
-                                  { }
-                              };
+                         {
+                             try
+                             {
+                                 switch (_wRadioGroup.SelectedItem)
+                                 {
+                                     case 1:
+                                         _wVal = Math.Min (int.Parse (_wText.Text), 100);
+
+                                         break;
+                                     case 0:
+                                     case 2:
+                                     case 3:
+                                         _wVal = int.Parse (_wText.Text);
+
+                                         break;
+                                 }
+
+                                 DimPosChanged (_curView);
+                             }
+                             catch
+                             { }
+                         };
         _sizeFrame.Add (_wText);
         _sizeFrame.Add (_wRadioGroup);
 
         radioItems = new [] { "_Auto", "P_ercent(height)", "F_ill(height)", "Ab_solute(height)" };
-        label = new Label { X = Pos.Right (_wRadioGroup) + 1, Y = 0, Text = "Height:" };
+        label = new() { X = Pos.Right (_wRadioGroup) + 1, Y = 0, Text = "Height:" };
         _sizeFrame.Add (label);
-        _hText = new TextField { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_hVal}" };
+        _hText = new() { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_hVal}" };
 
         _hText.Accept += (s, args) =>
                          {
@@ -263,20 +263,22 @@ public class AllViewsTester : Scenario
                          };
         _sizeFrame.Add (_hText);
 
-        _hRadioGroup = new RadioGroup { X = Pos.X (label), Y = Pos.Bottom (label), RadioLabels = radioItems };
+        _hRadioGroup = new() { X = Pos.X (label), Y = Pos.Bottom (label), RadioLabels = radioItems };
         _hRadioGroup.SelectedItemChanged += (s, selected) => DimPosChanged (_curView);
         _sizeFrame.Add (_hRadioGroup);
 
         _settingsPane.Add (_sizeFrame);
 
-        label = new Label { X = 0, Y = Pos.Bottom (_sizeFrame), Text = "_Orientation:" };
-        _orientation = new RadioGroup
+        label = new() { X = 0, Y = Pos.Bottom (_sizeFrame), Text = "_Orientation:" };
+
+        _orientation = new()
         {
             X = Pos.Right (label) + 1,
             Y = Pos.Top (label),
             RadioLabels = new [] { "Horizontal", "Vertical" },
             Orientation = Orientation.Horizontal
         };
+
         _orientation.SelectedItemChanged += (s, selected) =>
                                             {
                                                 if (_curView?.GetType ().GetProperty ("Orientation") is { } prop)
@@ -286,7 +288,8 @@ public class AllViewsTester : Scenario
                                             };
         _settingsPane.Add (label, _orientation);
 
-        label = new Label { X = 0, Y = Pos.Bottom (_orientation), Text = "_Text:" };
+        label = new() { X = 0, Y = Pos.Bottom (_orientation), Text = "_Text:" };
+
         _demoTextView = new ()
         {
             X = Pos.Right (label) + 1,
@@ -295,15 +298,16 @@ public class AllViewsTester : Scenario
             Height = Dim.Auto (minimumContentDim: 2),
             Text = _demoText
         };
+
         _demoTextView.ContentsChanged += (s, e) =>
-                                     {
-                                         _demoText = _demoTextView.Text;
-                                         _curView.Text = _demoText;
-                                     };
+                                         {
+                                             _demoText = _demoTextView.Text;
+                                             _curView.Text = _demoText;
+                                         };
 
         _settingsPane.Add (label, _demoTextView);
 
-        _hostPane = new FrameView
+        _hostPane = new()
         {
             X = Pos.Right (_leftPane),
             Y = Pos.Bottom (_settingsPane),
@@ -419,47 +423,43 @@ public class AllViewsTester : Scenario
             return;
         }
 
-        LayoutStyle layout = view.LayoutStyle;
-
         try
         {
-            //view.LayoutStyle = LayoutStyle.Absolute;
-
             view.X = _xRadioGroup.SelectedItem switch
-            {
-                0 => Pos.Percent (_xVal),
-                1 => Pos.AnchorEnd (),
-                2 => Pos.Center (),
-                3 => Pos.Absolute (_xVal),
-                _ => view.X
-            };
+                     {
+                         0 => Pos.Percent (_xVal),
+                         1 => Pos.AnchorEnd (),
+                         2 => Pos.Center (),
+                         3 => Pos.Absolute (_xVal),
+                         _ => view.X
+                     };
 
             view.Y = _yRadioGroup.SelectedItem switch
-            {
-                0 => Pos.Percent (_yVal),
-                1 => Pos.AnchorEnd (),
-                2 => Pos.Center (),
-                3 => Pos.Absolute (_yVal),
-                _ => view.Y
-            };
+                     {
+                         0 => Pos.Percent (_yVal),
+                         1 => Pos.AnchorEnd (),
+                         2 => Pos.Center (),
+                         3 => Pos.Absolute (_yVal),
+                         _ => view.Y
+                     };
 
             view.Width = _wRadioGroup.SelectedItem switch
-            {
-                0 => Dim.Auto (),
-                1 => Dim.Percent (_wVal),
-                2 => Dim.Fill (_wVal),
-                3 => Dim.Absolute (_wVal),
-                _ => view.Width
-            };
+                         {
+                             0 => Dim.Auto (),
+                             1 => Dim.Percent (_wVal),
+                             2 => Dim.Fill (_wVal),
+                             3 => Dim.Absolute (_wVal),
+                             _ => view.Width
+                         };
 
             view.Height = _hRadioGroup.SelectedItem switch
-            {
-                0 => Dim.Auto (),
-                1 => Dim.Percent (_hVal),
-                2 => Dim.Fill (_hVal),
-                3 => Dim.Absolute (_hVal),
-                _ => view.Height
-            };
+                          {
+                              0 => Dim.Auto (),
+                              1 => Dim.Percent (_hVal),
+                              2 => Dim.Fill (_hVal),
+                              3 => Dim.Absolute (_hVal),
+                              _ => view.Height
+                          };
         }
         catch (Exception e)
         {
@@ -468,7 +468,7 @@ public class AllViewsTester : Scenario
 
         if (view.Width is DimAuto)
         {
-            _wText.Text = $"Auto";
+            _wText.Text = "Auto";
             _wText.Enabled = false;
         }
         else
@@ -479,7 +479,7 @@ public class AllViewsTester : Scenario
 
         if (view.Height is DimAuto)
         {
-            _hText.Text = $"Auto";
+            _hText.Text = "Auto";
             _hText.Enabled = false;
         }
         else
@@ -488,8 +488,6 @@ public class AllViewsTester : Scenario
             _hText.Enabled = true;
         }
 
-
-
         UpdateTitle (view);
     }
 
@@ -532,28 +530,28 @@ public class AllViewsTester : Scenario
         var h = view.Height.ToString ();
         _wRadioGroup.SelectedItem = _dimNames.IndexOf (_dimNames.Where (s => w.Contains (s)).First ());
         _hRadioGroup.SelectedItem = _dimNames.IndexOf (_dimNames.Where (s => h.Contains (s)).First ());
+
         if (view.Width is DimAuto)
         {
-            _wText.Text = $"Auto";
+            _wText.Text = "Auto";
             _wText.Enabled = false;
         }
         else
         {
-            _wText.Text = $"100";
+            _wText.Text = "100";
             _wText.Enabled = true;
         }
 
         if (view.Height is DimAuto)
         {
-            _hText.Text = $"Auto";
+            _hText.Text = "Auto";
             _hText.Enabled = false;
         }
         else
         {
-            _hText.Text = $"100";
+            _hText.Text = "100";
             _hText.Enabled = true;
         }
-
     }
 
     private void UpdateTitle (View view) { _hostPane.Title = $"{view.GetType ().Name} - {view.X}, {view.Y}, {view.Width}, {view.Height}"; }

+ 2 - 20
UnitTests/UICatalog/ScenarioTests.cs

@@ -106,7 +106,6 @@ public class ScenarioTests : TestsAllViews
 
         // Settings
         FrameView _settingsPane;
-        CheckBox _computedCheckBox;
         FrameView _locationFrame;
         RadioGroup _xRadioGroup;
         TextField _xText;
@@ -164,15 +163,13 @@ public class ScenarioTests : TestsAllViews
             ColorScheme = Colors.ColorSchemes ["TopLevel"],
             Title = "Settings"
         };
-        _computedCheckBox = new () { X = 0, Y = 0, Text = "Computed Layout", Checked = true };
-        _settingsPane.Add (_computedCheckBox);
 
         var radioItems = new [] { "Percent(x)", "AnchorEnd(x)", "Center", "Absolute(x)" };
 
         _locationFrame = new ()
         {
-            X = Pos.Left (_computedCheckBox),
-            Y = Pos.Bottom (_computedCheckBox),
+            X = 0,
+            Y = 0,
             Height = 3 + radioItems.Length,
             Width = 36,
             Title = "Location (Pos)"
@@ -249,15 +246,6 @@ public class ScenarioTests : TestsAllViews
                                                   _curView = CreateClass (_viewClasses.Values.ToArray () [_classListView.SelectedItem]);
                                               };
 
-        _computedCheckBox.Toggled += (s, e) =>
-                                     {
-                                         if (_curView != null)
-                                         {
-                                             //_curView.LayoutStyle = e.OldValue == true ? LayoutStyle.Absolute : LayoutStyle.Computed;
-                                             _hostPane.LayoutSubviews ();
-                                         }
-                                     };
-
         _xRadioGroup.SelectedItemChanged += (s, selected) => DimPosChanged (_curView);
 
         _xText.TextChanged += (s, args) =>
@@ -351,11 +339,8 @@ public class ScenarioTests : TestsAllViews
                 return;
             }
 
-            LayoutStyle layout = view.LayoutStyle;
-
             try
             {
-                //view.LayoutStyle = LayoutStyle.Absolute;
 
                 switch (_xRadioGroup.SelectedItem)
                 {
@@ -531,9 +516,6 @@ public class ScenarioTests : TestsAllViews
                 view?.GetType ().GetProperty ("Source")?.GetSetMethod ()?.Invoke (view, new [] { source });
             }
 
-            // Set Settings
-            _computedCheckBox.Checked = view.LayoutStyle == LayoutStyle.Computed;
-
             // Add
             _hostPane.Add (view);
 

+ 28 - 65
UnitTests/View/Layout/AbsoluteLayoutTests.cs

@@ -1,16 +1,10 @@
 using Xunit.Abstractions;
 
-//using GraphViewTests = Terminal.Gui.Views.GraphViewTests;
-
-// Alias Console to MockConsole so we don't accidentally use Console
-
 namespace Terminal.Gui.LayoutTests;
 
-public class AbsoluteLayoutTests
+public class AbsoluteLayoutTests (ITestOutputHelper output)
 {
-    private readonly ITestOutputHelper _output;
-    public AbsoluteLayoutTests (ITestOutputHelper output) { _output = output; }
-
+    private readonly ITestOutputHelper _output = output;
 
     [Fact]
     [TestRespondersDisposed]
@@ -22,11 +16,10 @@ public class AbsoluteLayoutTests
         var v = new View { Frame = frame };
         v.Height = newFrame.Height;
         v.Width = newFrame.Width;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
+                      new (0, 0, newFrame.Width, newFrame.Height),
                       v.Viewport
                      ); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (1), v.X);
@@ -43,7 +36,6 @@ public class AbsoluteLayoutTests
         var v = new View { Frame = Rectangle.Empty };
         v.Height = Dim.Fill ();
         v.Width = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
     }
 
@@ -57,11 +49,10 @@ public class AbsoluteLayoutTests
         var v = new View { Frame = frame };
         v.X = newFrame.X;
         v.Y = newFrame.Y;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
+                      new (0, 0, newFrame.Width, newFrame.Height),
                       v.Viewport
                      ); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal ($"Absolute({newFrame.X})", v.X.ToString ());
@@ -78,7 +69,6 @@ public class AbsoluteLayoutTests
         var v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
     }
 
@@ -91,73 +81,61 @@ public class AbsoluteLayoutTests
         v.Y = 2;
         v.Height = 3;
         v.Width = 4;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         v.Dispose ();
 
-        v = new View { Frame = Rectangle.Empty };
+        v = new() { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
         v.Height = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rectangle.Empty };
+        v = new() { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
         v.Height = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
 
         v.X = 1;
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rectangle.Empty };
+        v = new() { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
         v.Height = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
 
         v.Y = 2;
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rectangle.Empty };
+        v = new() { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
         v.Height = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
 
         v.Width = 3;
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rectangle.Empty };
+        v = new() { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
         v.Height = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
 
         v.Height = 3;
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rectangle.Empty };
+        v = new() { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
         v.Height = Dim.Fill ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Computed);
 
         v.X = 1;
         v.Y = 2;
         v.Height = 3;
         v.Width = 4;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         v.Dispose ();
     }
 
@@ -166,16 +144,14 @@ public class AbsoluteLayoutTests
     public void AbsoluteLayout_Constructor ()
     {
         var v = new View ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         v.Dispose ();
 
         var frame = Rectangle.Empty;
-        v = new View { Frame = frame };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
+        v = new() { Frame = frame };
         Assert.Equal (frame, v.Frame);
 
         Assert.Equal (
-                      new Rectangle (0, 0, frame.Width, frame.Height),
+                      new (0, 0, frame.Width, frame.Height),
                       v.Viewport
                      ); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (0), v.X);
@@ -184,13 +160,12 @@ public class AbsoluteLayoutTests
         Assert.Equal (Dim.Absolute (0), v.Height);
         v.Dispose ();
 
-        frame = new Rectangle (1, 2, 3, 4);
-        v = new View { Frame = frame };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
+        frame = new (1, 2, 3, 4);
+        v = new() { Frame = frame };
         Assert.Equal (frame, v.Frame);
 
         Assert.Equal (
-                      new Rectangle (0, 0, frame.Width, frame.Height),
+                      new (0, 0, frame.Width, frame.Height),
                       v.Viewport
                      ); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (1), v.X);
@@ -199,12 +174,11 @@ public class AbsoluteLayoutTests
         Assert.Equal (Dim.Absolute (4), v.Height);
         v.Dispose ();
 
-        v = new View { Frame = frame, Text = "v" };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
+        v = new() { Frame = frame, Text = "v" };
         Assert.Equal (frame, v.Frame);
 
         Assert.Equal (
-                      new Rectangle (0, 0, frame.Width, frame.Height),
+                      new (0, 0, frame.Width, frame.Height),
                       v.Viewport
                      ); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (1), v.X);
@@ -213,34 +187,28 @@ public class AbsoluteLayoutTests
         Assert.Equal (Dim.Absolute (4), v.Height);
         v.Dispose ();
 
-        v = new View { X = frame.X, Y = frame.Y, Text = "v" };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
+        v = new() { X = frame.X, Y = frame.Y, Text = "v" };
 
-        // BUGBUG: v2 - I think the default size should be 0,0 not 1,1
-        // That is correct it should be 0,0 because AutoSize is false
-        // and the size wasn't set on the initializer
-        Assert.Equal (new Rectangle (frame.X, frame.Y, 0, 0), v.Frame);
-        Assert.Equal (new Rectangle (0, 0, 0, 0), v.Viewport); // With Absolute Viewport *is* deterministic before Layout
+        Assert.Equal (new (frame.X, frame.Y, 0, 0), v.Frame);
+        Assert.Equal (new (0, 0, 0, 0), v.Viewport); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (1), v.X);
         Assert.Equal (Pos.Absolute (2), v.Y);
         Assert.Equal (Dim.Absolute (0), v.Width);
         Assert.Equal (Dim.Absolute (0), v.Height);
         v.Dispose ();
 
-        v = new View ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
-        Assert.Equal (new Rectangle (0, 0, 0, 0), v.Frame);
-        Assert.Equal (new Rectangle (0, 0, 0, 0), v.Viewport); // With Absolute Viewport *is* deterministic before Layout
+        v = new ();
+        Assert.Equal (new (0, 0, 0, 0), v.Frame);
+        Assert.Equal (new (0, 0, 0, 0), v.Viewport); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (0), v.X);
         Assert.Equal (Pos.Absolute (0), v.Y);
         Assert.Equal (Dim.Absolute (0), v.Width);
         Assert.Equal (Dim.Absolute (0), v.Height);
         v.Dispose ();
 
-        v = new View { X = frame.X, Y = frame.Y, Width = frame.Width, Height = frame.Height };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
-        Assert.Equal (new Rectangle (frame.X, frame.Y, 3, 4), v.Frame);
-        Assert.Equal (new Rectangle (0, 0, 3, 4), v.Viewport); // With Absolute Viewport *is* deterministic before Layout
+        v = new() { X = frame.X, Y = frame.Y, Width = frame.Width, Height = frame.Height };
+        Assert.Equal (new (frame.X, frame.Y, 3, 4), v.Frame);
+        Assert.Equal (new (0, 0, 3, 4), v.Viewport); // With Absolute Viewport *is* deterministic before Layout
         Assert.Equal (Pos.Absolute (1), v.X);
         Assert.Equal (Pos.Absolute (2), v.Y);
         Assert.Equal (Dim.Absolute (3), v.Width);
@@ -254,20 +222,15 @@ public class AbsoluteLayoutTests
     {
         var superRect = new Rectangle (0, 0, 100, 100);
         var super = new View { Frame = superRect, Text = "super" };
-        Assert.True (super.LayoutStyle == LayoutStyle.Absolute);
         var v1 = new View { X = 0, Y = 0, Width = 10, Height = 10 };
-        Assert.True (v1.LayoutStyle == LayoutStyle.Absolute);
 
         var v2 = new View { X = 10, Y = 10, Width = 10, Height = 10 };
-        Assert.True (v2.LayoutStyle == LayoutStyle.Absolute);
 
         super.Add (v1, v2);
-        Assert.True (v1.LayoutStyle == LayoutStyle.Absolute);
-        Assert.True (v2.LayoutStyle == LayoutStyle.Absolute);
 
         super.LayoutSubviews ();
-        Assert.Equal (new Rectangle (0, 0, 10, 10), v1.Frame);
-        Assert.Equal (new Rectangle (10, 10, 10, 10), v2.Frame);
+        Assert.Equal (new (0, 0, 10, 10), v1.Frame);
+        Assert.Equal (new (10, 10, 10, 10), v2.Frame);
         super.Dispose ();
     }
 }

+ 0 - 87
UnitTests/View/Layout/Dim.Tests.cs

@@ -146,39 +146,6 @@ public class DimTests
         Assert.Equal (0, count);
     }
 
-    // TODO: This actually a SetRelativeLayout/LayoutSubViews test and should be moved
-    // TODO: A new test that calls SetRelativeLayout directly is needed.
-    [Fact]
-    [TestRespondersDisposed]
-    public void
-        Dim_Validation_Do_Not_Throws_If_NewValue_Is_DimAbsolute_And_OldValue_Is_Another_Type_After_Sets_To_LayoutStyle_Absolute ()
-    {
-        var t = new View { Width = 80, Height = 25, Text = "top" };
-
-        var w = new Window { Width = Dim.Fill (), Height = Dim.Absolute (10) };
-        var v = new View { Width = Dim.Width (w) - 2, Height = Dim.Percent (10), Text = "v" };
-
-        w.Add (v);
-        t.Add (w);
-
-        Assert.Equal (LayoutStyle.Absolute, t.LayoutStyle);
-        Assert.Equal (LayoutStyle.Computed, w.LayoutStyle);
-        Assert.Equal (LayoutStyle.Computed, v.LayoutStyle);
-
-        t.LayoutSubviews ();
-        Assert.Equal (2, v.Width = 2);
-        Assert.Equal (2, v.Height = 2);
-
-        // Force v to be LayoutStyle.Absolute;
-        v.Frame = new Rectangle (0, 1, 3, 4);
-        Assert.Equal (LayoutStyle.Absolute, v.LayoutStyle);
-        t.LayoutSubviews ();
-
-        Assert.Equal (2, v.Width = 2);
-        Assert.Equal (2, v.Height = 2);
-        t.Dispose ();
-    }
-
     // TODO: This actually a SetRelativeLayout/LayoutSubViews test and should be moved
     // TODO: A new test that calls SetRelativeLayout directly is needed.
     [Fact]
@@ -203,60 +170,6 @@ public class DimTests
         t.Dispose ();
     }
 
-
-    // See #2461
-    //[Fact]
-    //public void Dim_Referencing_SuperView_Throws ()
-    //{
-    //	var super = new View ("super") {
-    //		Width = 10,
-    //		Height = 10
-    //	};
-    //	var view = new View ("view") {
-    //		Width = Dim.Width (super),	// this is not allowed
-    //		Height = Dim.Height (super),    // this is not allowed
-    //	};
-
-    //	super.Add (view);
-    //	super.BeginInit ();
-    //	super.EndInit ();
-    //	Assert.Throws<InvalidOperationException> (() => super.LayoutSubviews ());
-    //}
-
-    // TODO: This actually a SetRelativeLayout/LayoutSubViews test and should be moved
-    // TODO: A new test that calls SetRelativeLayout directly is needed.
-    [Fact]
-    [TestRespondersDisposed]
-    public void
-        Dim_Validation_Does_Not_Throw_If_NewValue_Is_DimAbsolute_And_OldValue_Is_Another_Type_After_Sets_To_LayoutStyle_Absolute ()
-    {
-        var t = new View { Width = 80, Height = 25, Text = "top" };
-
-        var w = new Window { Width = Dim.Fill (), Height = Dim.Absolute (10) };
-        var v = new View { Width = Dim.Width (w) - 2, Height = Dim.Percent (10), Text = "v" };
-
-        w.Add (v);
-        t.Add (w);
-
-        Assert.Equal (LayoutStyle.Absolute, t.LayoutStyle);
-        Assert.Equal (LayoutStyle.Computed, w.LayoutStyle);
-        Assert.Equal (LayoutStyle.Computed, v.LayoutStyle);
-
-        t.LayoutSubviews ();
-        Assert.Equal (2, v.Width = 2);
-        Assert.Equal (2, v.Height = 2);
-
-        // Force v to be LayoutStyle.Absolute;
-        v.Frame = new Rectangle (0, 1, 3, 4);
-        Assert.Equal (LayoutStyle.Absolute, v.LayoutStyle);
-        t.LayoutSubviews ();
-
-        Assert.Equal (2, v.Width = 2);
-        Assert.Equal (2, v.Height = 2);
-        t.Dispose ();
-    }
-
-
     [Fact]
     public void DimHeight_Set_To_Null_Throws ()
     {

+ 0 - 6
UnitTests/View/Layout/FrameTests.cs

@@ -40,14 +40,11 @@ public class FrameTests (ITestOutputHelper output)
         var newFrame = new Rectangle (1, 2, 30, 40);
 
         var v = new View ();
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         v.Dispose ();
 
         v = new View { Frame = frame };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
 
         v.Frame = newFrame;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
@@ -62,7 +59,6 @@ public class FrameTests (ITestOutputHelper output)
 
         v = new View { X = frame.X, Y = frame.Y, Text = "v" };
         v.Frame = newFrame;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
@@ -78,7 +74,6 @@ public class FrameTests (ITestOutputHelper output)
         newFrame = new Rectangle (10, 20, 30, 40);
         v = new View { Frame = frame };
         v.Frame = newFrame;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
@@ -93,7 +88,6 @@ public class FrameTests (ITestOutputHelper output)
 
         v = new View { X = frame.X, Y = frame.Y, Text = "v" };
         v.Frame = newFrame;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (

+ 0 - 2
UnitTests/View/Layout/ViewportTests.cs

@@ -181,10 +181,8 @@ public class ViewportTests (ITestOutputHelper output)
         var newViewport = new Rectangle (0, 0, 30, 40);
 
         var v = new View { Frame = frame };
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
 
         v.Viewport = newViewport;
-        Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newViewport, v.Viewport);
         Assert.Equal (new Rectangle (1, 2, newViewport.Width, newViewport.Height), v.Frame);
         Assert.Equal (new Rectangle (0, 0, newViewport.Width, newViewport.Height), v.Viewport);

+ 0 - 7
UnitTests/View/ViewTests.cs

@@ -251,7 +251,6 @@ At 0,0
 
         view.Frame = new Rectangle (3, 3, 10, 1);
         Assert.Equal (new Rectangle (3, 3, 10, 1), view.Frame);
-        Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
         Assert.Equal (new Rectangle (0, 0, 10, 1), view.Viewport);
         Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         top.Draw ();
@@ -347,7 +346,6 @@ At 0,0
 
         view.Frame = new Rectangle (1, 1, 10, 1);
         Assert.Equal (new Rectangle (1, 1, 10, 1), view.Frame);
-        Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
         Assert.Equal (new Rectangle (0, 0, 10, 1), view.Viewport);
         Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         top.Draw ();
@@ -654,7 +652,6 @@ At 0,0
 
         view.Frame = new Rectangle (1, 1, 10, 1);
         Assert.Equal (new Rectangle (1, 1, 10, 1), view.Frame);
-        Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
         Assert.Equal (new Rectangle (0, 0, 10, 1), view.Viewport);
         Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         view.Draw ();
@@ -751,7 +748,6 @@ At 0,0
         Assert.True (r.Enabled);
         Assert.True (r.Visible);
 
-        Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle);
         Assert.Equal ($"View(){r.Viewport}", r.ToString ());
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
@@ -776,7 +772,6 @@ At 0,0
         // Empty Rect
         r = new View { Frame = Rectangle.Empty };
         Assert.NotNull (r);
-        Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle);
         Assert.Equal ($"View(){r.Viewport}", r.ToString ());
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
@@ -801,7 +796,6 @@ At 0,0
         // Rect with values
         r = new View { Frame = new Rectangle (1, 2, 3, 4) };
         Assert.NotNull (r);
-        Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle);
         Assert.Equal ($"View(){r.Frame}", r.ToString ());
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
@@ -832,7 +826,6 @@ At 0,0
             Height = Dim.Auto ()
         }; // BUGBUG: AutoSize or Height need be set
         Assert.NotNull (r);
-        Assert.Equal (LayoutStyle.Computed, r.LayoutStyle);
 
         // BUGBUG: IsInitialized must be true to process calculation
         r.BeginInit ();

+ 0 - 2
UnitTests/Views/ScrollViewTests.cs

@@ -341,7 +341,6 @@ public class ScrollViewTests
     public void Constructors_Defaults ()
     {
         var sv = new ScrollView ();
-        Assert.Equal (LayoutStyle.Absolute, sv.LayoutStyle);
         Assert.True (sv.CanFocus);
         Assert.Equal (new Rectangle (0, 0, 0, 0), sv.Frame);
         Assert.Equal (Rectangle.Empty, sv.Frame);
@@ -351,7 +350,6 @@ public class ScrollViewTests
         Assert.True (sv.KeepContentAlwaysInViewport);
 
         sv = new ScrollView { X = 1, Y = 2, Width = 20, Height = 10 };
-        Assert.Equal (LayoutStyle.Absolute, sv.LayoutStyle);
         Assert.True (sv.CanFocus);
         Assert.Equal (new Rectangle (1, 2, 20, 10), sv.Frame);
         Assert.Equal (Point.Empty, sv.ContentOffset);

+ 0 - 14
UnitTests/Views/WindowTests.cs

@@ -130,7 +130,6 @@ public class WindowTests
         Assert.Equal (string.Empty, defaultWindow.Title);
 
         // Toplevels have Width/Height set to Dim.Fill
-        Assert.Equal (LayoutStyle.Computed, defaultWindow.LayoutStyle);
 
         // If there's no SuperView, Top, or Driver, the default Fill width is int.MaxValue
         Assert.Equal ($"Window(){defaultWindow.Frame}", defaultWindow.ToString ());
@@ -156,17 +155,6 @@ public class WindowTests
         using var windowWithFrameRectEmpty = new Window { Frame = Rectangle.Empty, Title = "title" };
         Assert.NotNull (windowWithFrameRectEmpty);
         Assert.Equal ("title", windowWithFrameRectEmpty.Title);
-        Assert.Equal (LayoutStyle.Absolute, windowWithFrameRectEmpty.LayoutStyle);
-        Assert.Equal ("title", windowWithFrameRectEmpty.Title);
-        Assert.Equal (LayoutStyle.Absolute, windowWithFrameRectEmpty.LayoutStyle);
-        // TODO: Fix things so that this works in release and debug
-        // BUG: This also looks like it might be unintended behavior.
-        // Can actually also be removed, since the tests below make it redundant.
-    #if DEBUG
-        Assert.Equal ($"Window(title){windowWithFrameRectEmpty.Frame}", windowWithFrameRectEmpty.ToString ());
-    #else
-        Assert.Equal ($"Window(){windowWithFrameRectEmpty.Frame}", windowWithFrameRectEmpty.ToString ());
-    #endif
         Assert.True (windowWithFrameRectEmpty.CanFocus);
         Assert.False (windowWithFrameRectEmpty.HasFocus);
         Assert.Equal (Rectangle.Empty, windowWithFrameRectEmpty.Viewport);
@@ -193,8 +181,6 @@ public class WindowTests
         windowWithFrame1234.Title = "title";
         Assert.Equal ("title", windowWithFrame1234.Title);
         Assert.NotNull (windowWithFrame1234);
-        Assert.Equal (LayoutStyle.Absolute, windowWithFrame1234.LayoutStyle);
-        Assert.Equal (LayoutStyle.Absolute, windowWithFrame1234.LayoutStyle);
     #if DEBUG
         Assert.Equal ($"Window(title){windowWithFrame1234.Frame}", windowWithFrame1234.ToString ());
     #else

+ 1 - 1
docfx/docs/View.md

@@ -29,7 +29,7 @@ This covers my thinking on how we will refactor `View` and the classes in the `V
   * *Parent View* - A view that holds a reference to another view in a parent/child relationship, but is NOT a SuperView of the child. 
   * *Thickness* - A class describing a rectangle where each of the four sides can have a width. Valid width values are >= 0. The inner area of a Thickness is the sum of the widths of the four sides minus the size of the rectangle. The `Thickness` class has a `Draw` method that clears the rectangle. 
   * *Frame Class* - A `Frame` is a special form of `View` that appears outside of a normal `View`'s content area. Examples of `Frame`s are `Margin`, `Border`, and `Padding`. The `Frame` class is derived from `View` and uses a `Thickness` to hold the rectangle. 
-  * *Frame* - The `Rect` that defines the location and size of the `View` including all of the margin, border, adornments, padding, and content area. The coordinates are relative to the SuperView of the View (or, in the case of `Application.Top`, `ConsoleDriver.Row == 0; ConsoleDriver.Col == 0`). The Frame's location and size are controlled by either `Absolute` or `Computed` positioning via the `.X`, `.Y`, `.Height`, and `.Width` properties of the View. 
+  * *Frame* - The `Rect` that defines the location and size of the `View` including all of the margin, border, adornments, padding, and content area. The coordinates are relative to the SuperView of the View (or, in the case of `Application.Top`, `ConsoleDriver.Row == 0; ConsoleDriver.Col == 0`). The Frame's location and size are controlled by the `.X`, `.Y`, `.Height`, and `.Width` properties of the View. 
      * In v2, `View.Frame.Size` is the size of the `View`'s `ContentArea` plus the `Thickness` of the `View`'s `Margin`, `Border`, and `Padding`.
   * *Margin* - The `Frame` that separates a View from other SubViews of the same SuperView. The Margin is not part of the View's content and is not clipped by the View's `ClipArea`. By default `Margin` is `{0,0,0,0}`. `Margin` can be used instead of (or with) `Dim.Pos` to position a View relative to another View. 
       Eg. 

+ 1 - 1
docfx/docs/index.md

@@ -8,7 +8,7 @@
 * **[Templates](getting-started.md)** - The `dotnet new` command can be used to create a new Terminal.Gui app.
 * **[Keyboard](keyboard.md) and [Mouse](mouse.md) Input** - The library handles all the details of input processing and provides a simple event-based API for applications to consume.
 * **[Extensible Widgets](https://gui-cs.github.io/Terminal.GuiV2Docs/api/Terminal.Gui.View.html)** - All visible UI elements are subclasses of the `View` class, and these in turn can contain an arbitrary number of sub-views. Dozens of [Built-in Views](views.md) are provided.
-* **[Flexible Layout](layout.md)** - *Computed Layout* makes it easy to lay out controls relative to each other and enables dynamic terminal UIs. *Absolute Layout* allows for precise control over the position and size of controls.
+* **[Powerful Layout Engine](layout.md)** - The layout engine makes it easy to lay out controls relative to each other and enables dynamic terminal UIs. 
 * **[Clipboard support](https://gui-cs.github.io/Terminal.GuiV2Docs/api/Terminal.Gui.Clipboard.html)** - Cut, Copy, and Paste is provided through the [`Clipboard`] class.
 * **Multi-tasking** - The [Mainloop](https://gui-cs.github.io/Terminal.GuiV2Docs/api/Terminal.Gui.MainLoop.html) supports processing events, idle handlers, and timers. Most classes are safe for threading.
 * **[Reactive Extensions](https://github.com/dotnet/reactive)** - Use reactive extensions and benefit from increased code readability, and the ability to apply the MVVM pattern and [ReactiveUI](https://www.reactiveui.net/) data bindings. See the [source code](https://github.com/gui-cs/Terminal.GuiV2Docs/tree/master/ReactiveExample) of a sample app.

+ 0 - 2
docfx/docs/layout.md

@@ -54,8 +54,6 @@ var label2 = new Label () {
 
 The `Frame` property is a rectangle that provides the current location and size of the view relative to the View's `Superview`'s Content area. 
 
-The `View.LayoutStyle` property can be used to determine how the View is treated. If the style is `Absolute`, the `X`, `Y`, `Width`, and `Height` objects are all absolute values. If the style is `Computed`, one or more of the `X`, `Y`, `Width`, and `Height` objects describe a computed value.
-
 ## The `Pos` Type
 
 The [Pos](~/api/Terminal.Gui.Pos.yml) is the type of `View.X` and `View.Y` and supports the following sub-types:

+ 2 - 1
docfx/docs/migratingfromv1.md

@@ -37,7 +37,6 @@ Static class `Attribute.Make` has been removed. Use constructor instead
 + var c = Color.Yellow;
 ```
 
-
 ## Low-Level Type Changes
 
 * `Rect` -> `Rectangle`
@@ -115,6 +114,7 @@ In v1, [Application.Init](~/api/Terminal.Gui./Terminal.Gui.Application.Init) aut
 
 In v2, the layout system has been improved to make it easier to create complex user interfaces. If you are using custom layouts in your application, you may need to update them to use the new layout system.
 
+* The distinction between `Absoulte Layout` and `Computed Layout` has been removed, as has the `LayoutStyle` enum. v1 drew a false distinction between these styles. 
 * [View.Frame](~/api/Terminal.Gui.View.Frame.yml) now represents the position and size of the view in the superview's coordinate system. The `Frame` property is of type `Rectangle`.
 * [View.Bounds](~/api/Terminal.Gui.View.Bounds.yml) has been replaced by [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml). The `Viewport` property represents the visible area of the view in its own coordinate system. The `Viewport` property is of type `Rectangle`.
 * [View.ContentSize](~/api/Terminal.Gui.View.ContentSize.yml) represents the size of the view's content. The `ContentSize` property is of type `Size`. This replaces `ScrollView` and `ScrollBarView` in v1. See more below.
@@ -123,6 +123,7 @@ In v2, the layout system has been improved to make it easier to create complex u
 
 ### `Bounds` -> `Viewport`
 
+* Remove all references ot `LayoutStyle`.
 * Rename `Bounds` to `Viewport`. The `Location` property of `Bounds` can now have non-zero values.
 * Update any code that assumed `Bounds.Location` was always `Point.Empty`.
 * Update any code that used `Bounds` to refer to the size of the view's content. Use `ContentSize` instead.