Tig 1 år sedan
förälder
incheckning
b0a73caa0c
1 ändrade filer med 0 tillägg och 58 borttagningar
  1. 0 58
      Terminal.Gui/View/Layout/ViewLayout.cs

+ 0 - 58
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -339,64 +339,6 @@ public partial class View
 
     #endregion Frame
 
-    #region AutoSize
-
-    /// <summary>
-    ///     Gets or sets a flag that determines whether the View will be automatically resized to fit the <see cref="Text"/>
-    ///     within <see cref="Viewport"/>.
-    ///     <para>
-    ///         The default is <see langword="false"/>. Set to <see langword="true"/> to turn on AutoSize. If
-    ///         <see langword="true"/> then <see cref="Width"/> and <see cref="Height"/> will be used if <see cref="Text"/> can
-    ///         fit; if <see cref="Text"/> won't fit the view will be resized as needed.
-    ///     </para>
-    ///     <para>
-    ///         If <see cref="AutoSize"/> is set to <see langword="true"/> then <see cref="Width"/> and <see cref="Height"/>
-    ///         will be changed to <see cref="Dim.DimAbsolute"/> if they are not already.
-    ///     </para>
-    ///     <para>
-    ///         If <see cref="AutoSize"/> is set to <see langword="false"/> then <see cref="Width"/> and <see cref="Height"/>
-    ///         will left unchanged.
-    ///     </para>
-    /// </summary>
-    [ObsoleteAttribute ("Use Dim.Auto instead.", false)]
-    public virtual bool AutoSize
-    {
-        get => _height is Dim.DimAuto && _width is Dim.DimAuto;
-        set
-        {
-            TextFormatter.AutoSize = value;
-
-            // BUGBUG: This is all a hack until AutoSize is removed
-            if (value)
-            {
-                UpdateTextFormatterText ();
-
-                if (IsInitialized)
-                {
-                    Height = Dim.Auto (Dim.DimAutoStyle.Text);
-                    Width = Dim.Auto (Dim.DimAutoStyle.Text);
-                }
-                else
-                {
-                    _height = Dim.Auto (Dim.DimAutoStyle.Text);
-                    _width = Dim.Auto (Dim.DimAutoStyle.Text);
-                    OnResizeNeeded ();
-                }
-            }
-            else
-            {
-                _height = ContentSize.Height;
-                _width = ContentSize.Width;
-
-                // Force ContentSize to be reset to Viewport
-                _contentSize = Size.Empty;
-                OnResizeNeeded ();
-            }
-        }
-    }
-
-    #endregion AutoSize
-
     #region Layout Engine
 
     /// <summary>