Browse Source

Removed dead commented code

Tig 1 year ago
parent
commit
40768b5bf8
1 changed files with 4 additions and 20 deletions
  1. 4 20
      Terminal.Gui/View/Layout/ViewLayout.cs

+ 4 - 20
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -181,26 +181,10 @@ public partial class View
                 return Rectangle.Empty with { Size = Frame.Size };
                 return Rectangle.Empty with { Size = Frame.Size };
             }
             }
 
 
-            //if (!IsInitialized)
-            //{
-                int width = Math.Max (
-                                      0,
-                                      Frame.Size.Width
-                                      - Margin.Thickness.Horizontal
-                                      - Border.Thickness.Horizontal
-                                      - Padding.Thickness.Horizontal
-                                     );
-
-                int height = Math.Max (
-                                       0,
-                                       Frame.Size.Height - Margin.Thickness.Vertical - Border.Thickness.Vertical - Padding.Thickness.Vertical
-                                      );
-
-                return Rectangle.Empty with { Size = new (width, height) };
-            //}
+            int width = Math.Max (0, Frame.Size.Width - Margin.Thickness.Horizontal - Border.Thickness.Horizontal - Padding.Thickness.Horizontal);
+            int height = Math.Max (0, Frame.Size.Height - Margin.Thickness.Vertical - Border.Thickness.Vertical - Padding.Thickness.Vertical);
 
 
-            //var totalThickness = Margin.Thickness + Border.Thickness + Padding.Thickness;
-            //return new (Point.Empty, totalThickness.GetInside (Frame).Size ?? Frame.Size);
+            return Rectangle.Empty with { Size = new (width, height) };
         }
         }
         set
         set
         {
         {
@@ -512,7 +496,7 @@ public partial class View
         Rectangle screen = FrameToScreen ();
         Rectangle screen = FrameToScreen ();
         screen.Offset (boundsOffset.X + bounds.X, boundsOffset.Y + bounds.Y);
         screen.Offset (boundsOffset.X + bounds.X, boundsOffset.Y + bounds.Y);
 
 
-        return new Rectangle(screen.Location, bounds.Size);
+        return new Rectangle (screen.Location, bounds.Size);
     }
     }
 
 
 #nullable enable
 #nullable enable