2
0
Эх сурвалжийг харах

Remove stale bounds hacks

Thomas 2 жил өмнө
parent
commit
b39413c4aa

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

@@ -71,8 +71,7 @@ namespace Terminal.Gui {
 		public override void Redraw (Rect bounds)
 		{
 			base.Redraw (bounds);
-			bounds = Bounds;
-
+			
 			Move (0, 0);
 			Driver.SetAttribute (GetNormalColor ());
 

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

@@ -194,8 +194,8 @@ namespace Terminal.Gui {
 				int spaceAtBottom = Math.Max (0, GetTabHeight (false) - 1);
 				int startAtY = Math.Max (0, GetTabHeight (true) - 1);
 
-				DrawFrame (new Rect (0, startAtY, Bounds.Width,
-				Math.Max (Bounds.Height - spaceAtBottom - startAtY, 0)), 0, true);
+				DrawFrame (new Rect (0, startAtY, bounds.Width,
+				Math.Max (bounds.Height - spaceAtBottom - startAtY, 0)), 0, true);
 			}
 
 			if (Tabs.Any ()) {

+ 0 - 4
Terminal.Gui/Views/TileView.cs

@@ -326,10 +326,6 @@ namespace Terminal.Gui {
 		/// <inheritdoc/>
 		public override void Redraw (Rect bounds)
 		{
-			// TODO: We are getting passed stale bounds, does this only happen in TileView
-			// or is it a larger problem? This line should not be required right?
-			bounds = Bounds;
-
 			Driver.SetAttribute (ColorScheme.Normal);
 			Clear ();
 			base.Redraw (bounds);