FindDeepestView now correctly supports start with Adornments

This commit is contained in:
Tig Kindel
2024-02-27 09:51:02 -07:00
parent 3bc2909d73
commit aa4e2c0ae7
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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))]