diff --git a/Terminal.Gui/View/Adornment/Adornment.cs b/Terminal.Gui/View/Adornment/Adornment.cs index 2f3b5fdd4..b5408468a 100644 --- a/Terminal.Gui/View/Adornment/Adornment.cs +++ b/Terminal.Gui/View/Adornment/Adornment.cs @@ -160,7 +160,6 @@ public class Adornment : View, IDesignable /// /// Called when the of the Adornment is to be cleared. /// - /// /// to stop further clearing. protected override bool OnClearingViewport () { @@ -187,7 +186,6 @@ public class Adornment : View, IDesignable protected override bool OnDrawingSubviews () { return Thickness == Thickness.Empty; } /// Does nothing for Adornment - /// /// protected override bool OnRenderingLineCanvas () { return true; } diff --git a/Terminal.Gui/View/Adornment/Border.cs b/Terminal.Gui/View/Adornment/Border.cs index bbaa848fe..723e1c906 100644 --- a/Terminal.Gui/View/Adornment/Border.cs +++ b/Terminal.Gui/View/Adornment/Border.cs @@ -941,22 +941,11 @@ public class Border : Adornment return true; ; } + /// + /// Gets the subview used to render . + /// public SpinnerView? DrawIndicator { get; private set; } = null; - /// - /// - 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 stops, out List steps); diff --git a/Terminal.Gui/View/View.Drawing.cs b/Terminal.Gui/View/View.Drawing.cs index 549f80456..c242b1fc2 100644 --- a/Terminal.Gui/View/View.Drawing.cs +++ b/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 diff --git a/Terminal.Gui/View/View.cs b/Terminal.Gui/View/View.cs index 9c4b687f5..00e6df6ad 100644 --- a/Terminal.Gui/View/View.cs +++ b/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; - /// Gets or sets a value indicating whether this can respond to user interaction. public bool Enabled { diff --git a/Terminal.Gui/Views/Bar.cs b/Terminal.Gui/Views/Bar.cs index 516bbbee4..29c867a57 100644 --- a/Terminal.Gui/Views/Bar.cs +++ b/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; diff --git a/Terminal.Gui/Views/SpinnerView/SpinnerView.cs b/Terminal.Gui/Views/SpinnerView/SpinnerView.cs index 216167221..a16f88a26 100644 --- a/Terminal.Gui/Views/SpinnerView/SpinnerView.cs +++ b/Terminal.Gui/Views/SpinnerView/SpinnerView.cs @@ -89,7 +89,7 @@ public class SpinnerView : View, IDesignable /// Gets or sets the number of milliseconds to wait between characters in the animation. /// /// This is the maximum speed the spinner will rotate at. You still need to call - /// or to advance/start animation. + /// or to advance/start animation. /// public int SpinDelay { diff --git a/UICatalog/Scenarios/Adornments.cs b/UICatalog/Scenarios/Adornments.cs index a3dab0f2b..55feb28ec 100644 --- a/UICatalog/Scenarios/Adornments.cs +++ b/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;