浏览代码

Done requested changes.

BDisp 2 年之前
父节点
当前提交
75eca476d9
共有 2 个文件被更改,包括 18 次插入15 次删除
  1. 11 8
      Terminal.Gui/Core/View.cs
  2. 7 7
      UnitTests/Menus/ContextMenuTests.cs

+ 11 - 8
Terminal.Gui/Core/View.cs

@@ -3160,14 +3160,17 @@ namespace Terminal.Gui {
 		}
 		}
 
 
 		/// <summary>
 		/// <summary>
-		/// Finds which view that belong to the <paramref name="start"/> at the provided location.
-		/// </summary>
-		/// <param name="start">The view where to look for.</param>
-		/// <param name="x">The column location.</param>
-		/// <param name="y">The row location.</param>
-		/// <param name="resx">The found view column location.</param>
-		/// <param name="resy">The found view row location.</param>
-		/// <returns>The view that belong to the provided location.</returns>
+		/// Finds which view that belong to the <paramref name="start"/> superview at the provided location.
+		/// </summary>
+		/// <param name="start">The superview where to look for.</param>
+		/// <param name="x">The column location in the superview.</param>
+		/// <param name="y">The row location in the superview.</param>
+		/// <param name="resx">The found view screen relative column location.</param>
+		/// <param name="resy">The found view screen relative row location.</param>
+		/// <returns>
+		///  The view that was found at the <praramref name="x"/> and <praramref name="y"/> coordinates.
+		///  <see langword="null"/> if no view was found.
+		/// </returns>
 		public static View FindDeepestView (View start, int x, int y, out int resx, out int resy)
 		public static View FindDeepestView (View start, int x, int y, out int resx, out int resy)
 		{
 		{
 			var startFrame = start.Frame;
 			var startFrame = start.Frame;

+ 7 - 7
UnitTests/Menus/ContextMenuTests.cs

@@ -907,14 +907,14 @@ namespace Terminal.Gui.MenuTests {
 		public void Draw_A_ContextManu_Over_A_Dialog ()
 		public void Draw_A_ContextManu_Over_A_Dialog ()
 		{
 		{
 			var top = Application.Top;
 			var top = Application.Top;
-			var win = new Window ("Window");
+			var win = new Window ();
 			top.Add (win);
 			top.Add (win);
 			Application.Begin (top);
 			Application.Begin (top);
 			((FakeDriver)Application.Driver).SetBufferSize (20, 15);
 			((FakeDriver)Application.Driver).SetBufferSize (20, 15);
 
 
 			Assert.Equal (new Rect (0, 0, 20, 15), win.Frame);
 			Assert.Equal (new Rect (0, 0, 20, 15), win.Frame);
 			TestHelpers.AssertDriverContentsWithFrameAre (@"
 			TestHelpers.AssertDriverContentsWithFrameAre (@"
-┌ Window ──────────┐
+┌──────────────────┐
 │                  │
 │                  │
 │                  │
 │                  │
 │                  │
 │                  │
@@ -930,15 +930,15 @@ namespace Terminal.Gui.MenuTests {
 │                  │
 │                  │
 └──────────────────┘", output);
 └──────────────────┘", output);
 
 
-			var dialog = new Dialog ("Dialog") { X = 2, Y = 2, Width = 15, Height = 4 };
+			var dialog = new Dialog () { X = 2, Y = 2, Width = 15, Height = 4 };
 			dialog.Add (new TextField ("Test") { X = Pos.Center (), Width = 10 });
 			dialog.Add (new TextField ("Test") { X = Pos.Center (), Width = 10 });
 			var rs = Application.Begin (dialog);
 			var rs = Application.Begin (dialog);
 
 
 			Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
 			Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
 			TestHelpers.AssertDriverContentsWithFrameAre (@"
 			TestHelpers.AssertDriverContentsWithFrameAre (@"
-┌ Window ──────────┐
+┌──────────────────┐
 │                  │
 │                  │
-│ ┌ Dialog ─────┐  │
+│ ┌─────────────┐  │
 │ │ Test        │  │
 │ │ Test        │  │
 │ │             │  │
 │ │             │  │
 │ └─────────────┘  │
 │ └─────────────┘  │
@@ -964,9 +964,9 @@ namespace Terminal.Gui.MenuTests {
 			var firstIteration = false;
 			var firstIteration = false;
 			Application.RunMainLoopIteration (ref rs, true, ref firstIteration);
 			Application.RunMainLoopIteration (ref rs, true, ref firstIteration);
 			TestHelpers.AssertDriverContentsWithFrameAre (@"
 			TestHelpers.AssertDriverContentsWithFrameAre (@"
-┌ Window ──────────┐
+┌──────────────────┐
 │                  │
 │                  │
-│ ┌ Dialog ─────┐  │
+│ ┌─────────────┐  │
 │ │ Test        │  │
 │ │ Test        │  │
 ┌───────────────────
 ┌───────────────────
 │ Select All   Ctrl+
 │ Select All   Ctrl+