Browse Source

updated Line

Tig 1 year ago
parent
commit
6d0d2abaf5
1 changed files with 3 additions and 19 deletions
  1. 3 19
      Terminal.Gui/Views/Line.cs

+ 3 - 19
Terminal.Gui/Views/Line.cs

@@ -13,29 +13,13 @@ public class Line : View
     public Orientation Orientation { get; set; }
     public Orientation Orientation { get; set; }
 
 
     /// <inheritdoc/>
     /// <inheritdoc/>
-    public override bool OnDrawAdornments ()
+    public override void OnDrawContent (Rectangle contentArea)
     {
     {
-        Rectangle screenBounds = BoundsToScreen (Bounds);
-        LineCanvas lc;
-
-        lc = SuperView?.LineCanvas;
-
-        lc.AddLine (
-                    screenBounds.Location,
+        LineCanvas.AddLine (
+                    BoundsToScreen (contentArea).Location,
                     Orientation == Orientation.Horizontal ? Frame.Width : Frame.Height,
                     Orientation == Orientation.Horizontal ? Frame.Width : Frame.Height,
                     Orientation,
                     Orientation,
                     BorderStyle
                     BorderStyle
                    );
                    );
-
-        return true;
     }
     }
-
-    //public override void OnDrawContentComplete (Rect contentArea)
-    //{
-    //	var screenBounds = ViewToScreen (Frame);
-
-    //}
-
-    /// <inheritdoc/>
-    public override void OnDrawContent (Rectangle contentArea) { OnDrawAdornments (); }
 }
 }