Tig преди 9 месеца
родител
ревизия
b0b5b23632

+ 0 - 2
Terminal.Gui/View/Adornment/Adornment.cs

@@ -160,7 +160,6 @@ public class Adornment : View, IDesignable
     /// <summary>
     ///     Called when the <see cref="Thickness"/> of the Adornment is to be cleared.
     /// </summary>
-    /// <param name="viewport"></param>
     /// <returns><see langword="true"/> to stop further clearing.</returns>
     protected override bool OnClearingViewport ()
     {
@@ -187,7 +186,6 @@ public class Adornment : View, IDesignable
     protected override bool OnDrawingSubviews () { return Thickness == Thickness.Empty; }
 
     /// <summary>Does nothing for Adornment</summary>
-    /// <param name="clipRegion"></param>
     /// <returns></returns>
     protected override bool OnRenderingLineCanvas () { return true; }
 

+ 3 - 14
Terminal.Gui/View/Adornment/Border.cs

@@ -941,22 +941,11 @@ public class Border : Adornment
         return true; ;
     }
 
+    /// <summary>
+    ///     Gets the subview used to render <see cref="ViewDiagnosticFlags.DrawIndicator"/>.
+    /// </summary>
     public SpinnerView? DrawIndicator { get; private set; } = null;
 
-    /// <param name="clipRegion"></param>
-    /// <inheritdoc />
-    protected override bool OnRenderingLineCanvas ()
-    {
-        if (DrawIndicator is { })
-        {
-            //DrawIndicator.AdvanceAnimation (false);
-            //DrawIndicator.DrawText();
-        }
-
-        RenderLineCanvas ();
-        return true;
-    }
-
     private void SetupGradientLineCanvas (LineCanvas lc, Rectangle rect)
     {
         GetAppealingGradientColors (out List<Color> stops, out List<int> steps);

+ 5 - 5
Terminal.Gui/View/View.Drawing.cs

@@ -37,15 +37,15 @@ public partial class View // Drawing APIs
             saved = SetClipToViewport ();
 
             DoSetAttribute ();
-            DoDrawSubviews ();
-
-            //DoSetAttribute ();
             DoClearViewport ();
 
-            //DoSetAttribute ();
+            DoSetAttribute ();
+            DoDrawSubviews ();
+
+            DoSetAttribute ();
             DoDrawText ();
 
-            //DoSetAttribute ();
+            DoSetAttribute ();
             DoDrawContent ();
 
             // Restore the clip before rendering the line canvas and adornment subviews

+ 0 - 3
Terminal.Gui/View/View.cs

@@ -255,9 +255,6 @@ public partial class View : Responder, ISupportInitializeNotification
 
     private bool _enabled = true;
 
-    // This is a cache of the Enabled property so that we can restore it when the superview is re-enabled.
-    private bool _oldEnabled;
-
     /// <summary>Gets or sets a value indicating whether this <see cref="Responder"/> can respond to user interaction.</summary>
     public bool Enabled
     {

+ 0 - 3
Terminal.Gui/Views/Bar.cs

@@ -202,9 +202,6 @@ public class Bar : View, IOrientation, IDesignable
         LayoutBarItems (args.OldContentSize);
     }
 
-    // This is used to calculate the minimum width of the Bar when the width is NOT Dim.Auto
-    private int? _minimumDimAutoWidth;
-
     private void LayoutBarItems (Size contentSize)
     {
         View? prevBarItem = null;

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

@@ -89,7 +89,7 @@ public class SpinnerView : View, IDesignable
     /// <summary>Gets or sets the number of milliseconds to wait between characters in the animation.</summary>
     /// <remarks>
     ///     This is the maximum speed the spinner will rotate at.  You still need to call
-    ///     <see cref="SpinnerView.AdvanceAnimation()"/> or <see cref="SpinnerView.AutoSpin"/> to advance/start animation.
+    ///     <see cref="SpinnerView.AdvanceAnimation(bool)"/> or <see cref="SpinnerView.AutoSpin"/> to advance/start animation.
     /// </remarks>
     public int SpinDelay
     {

+ 5 - 6
UICatalog/Scenarios/Adornments.cs

@@ -1,4 +1,5 @@
-using Terminal.Gui;
+using System;
+using Terminal.Gui;
 
 namespace UICatalog.Scenarios;
 
@@ -35,9 +36,8 @@ public class Adornments : Scenario
             Title = "The _Window",
             Arrangement = ViewArrangement.Movable,
 
-            // X = Pos.Center (),
-            Width = Dim.Percent (60),
-            Height = Dim.Percent (90)
+            Width = Dim.Fill (Dim.Func (() => editor.Frame.Width )),
+            Height = Dim.Fill ()
         };
         app.Add (window);
 
@@ -84,7 +84,7 @@ public class Adornments : Scenario
         };
 
         window.Margin.Data = "Margin";
-        window.Margin.Text = "Margin Text"; 
+        window.Margin.Text = "Margin Text";
         window.Margin.Thickness = new (0);
 
         window.Border.Data = "Border";
@@ -104,7 +104,6 @@ public class Adornments : Scenario
         longLabel.TextFormatter.WordWrap = true;
         window.Add (tf1, color, button, label, btnButtonInWindow, labelAnchorEnd, longLabel);
 
-        window.ClearingViewport += (s, e) => e.Cancel = true;
         window.Initialized += (s, e) =>
                               {
                                   editor.ViewToEdit = window;