Browse Source

Fixes #2122. Weird visual artifacts on clearing.

BDisp 2 years ago
parent
commit
b4fc85bfd6
2 changed files with 7 additions and 3 deletions
  1. 1 1
      Terminal.Gui/Core/View.cs
  2. 6 2
      UICatalog/Scenarios/Scrolling.cs

+ 1 - 1
Terminal.Gui/Core/View.cs

@@ -1498,7 +1498,7 @@ namespace Terminal.Gui {
 			} else if ((GetType ().IsPublic || GetType ().IsNestedPublic) && !IsOverridden (this, "Redraw") &&
 				(!NeedDisplay.IsEmpty || ChildNeedsDisplay || LayoutNeeded)) {
 
-				Clear (ViewToScreen (bounds));
+				Clear ();
 			}
 
 			if (!ustring.IsNullOrEmpty (TextFormatter.Text)) {

+ 6 - 2
UICatalog/Scenarios/Scrolling.cs

@@ -114,8 +114,12 @@ namespace UICatalog.Scenarios {
 			};
 			Win.Add (label);
 
-			// BUGBUG: ScrollView only supports Absolute Positioning (#72)
-			var scrollView = new ScrollView (new Rect (2, 2, 50, 20)) {
+			// FIXED: ScrollView only supports Absolute Positioning (#72)
+			var scrollView = new ScrollView {
+				X = 2,
+				Y = 2,
+				Width = 50,
+				Height = 20,
 				ColorScheme = Colors.TopLevel,
 				ContentSize = new Size (200, 100),
 				//ContentOffset = new Point (0, 0),