Răsfoiți Sursa

FindDeepestView now correctly supports start with Adornments

Tig Kindel 1 an în urmă
părinte
comite
aa4e2c0ae7

+ 3 - 3
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -572,15 +572,15 @@ public partial class View
 
         if (findAdornments)
         {
-            if (start.Margin.Thickness.Contains (start.Frame, x, y))
+            if (start.Margin.Thickness.Contains (start.Margin.Frame, x, y))
             {
                 return start.Margin;
             }
-            if (start.Border.Thickness.Contains (start.Frame, x, y))
+            if (start.Border.Thickness.Contains (start.Border.Frame, x, y))
             {
                 return start.Border;
             }
-            if (start.Padding.Thickness.Contains (start.Frame, x, y))
+            if (start.Padding.Thickness.Contains (start.Padding.Frame, x, y))
             {
                 return start.Padding;
             }

+ 1 - 1
UnitTests/View/FindDeepestViewTests.cs

@@ -184,7 +184,7 @@ public class FindDeepestViewTests (ITestOutputHelper output)
     [InlineData (1, 1, typeof (Border))]
     [InlineData (8, 8, typeof (Border))]
 
-    [InlineData (1, 1, typeof (Padding))]
+    [InlineData (2, 2, typeof (Padding))]
     [InlineData (7, 7, typeof (Padding))]
 
     [InlineData (5, 5, typeof (View))]