Bläddra i källkod

More Toplevel cleanup

Tig 10 månader sedan
förälder
incheckning
5b8c5021fe

+ 2 - 3
Terminal.Gui/Application/Application.Run.cs

@@ -173,11 +173,10 @@ public static partial class Application // Run (Begin, Run, End, Stop)
     }
     }
 
 
     /// <summary>
     /// <summary>
-    ///     Calls <see cref="View.PositionCursor"/> on the most focused view in the view starting with <paramref name="view"/>.
+    ///     Calls <see cref="View.PositionCursor"/> on the most focused view.
     /// </summary>
     /// </summary>
     /// <remarks>
     /// <remarks>
-    ///     Does nothing if <paramref name="view"/> is <see langword="null"/> or if the most focused view is not visible or
-    ///     enabled.
+    ///     Does nothing if there is no most focused view.
     ///     <para>
     ///     <para>
     ///         If the most focused view is not visible within it's superview, the cursor will be hidden.
     ///         If the most focused view is not visible within it's superview, the cursor will be hidden.
     ///     </para>
     ///     </para>

+ 0 - 17
Terminal.Gui/Views/Toplevel.cs

@@ -369,23 +369,6 @@ public partial class Toplevel : View
         return false;
         return false;
     }
     }
 
 
-    // TODO: v2 - Not sure this is needed anymore.
-    internal void PositionToplevels ()
-    {
-        return;
-
-
-        PositionToplevel (this);
-
-        foreach (View top in Subviews)
-        {
-            if (top is Toplevel)
-            {
-                PositionToplevel ((Toplevel)top);
-            }
-        }
-    }
-
     #endregion
     #endregion
 }
 }
 
 

+ 0 - 3
UnitTests/Views/ToplevelTests.cs

@@ -214,9 +214,6 @@ public partial class ToplevelTests (ITestOutputHelper output)
         Assert.Equal (9, ny); // 9+15+1(mb)=25
         Assert.Equal (9, ny); // 9+15+1(mb)=25
         Assert.NotNull (sb);
         Assert.NotNull (sb);
 
 
-        top.PositionToplevels ();
-        //Assert.Equal (new (0, 1, 60, 15), win.Frame);
-
         //Assert.Null (Toplevel._dragPosition);
         //Assert.Null (Toplevel._dragPosition);
         win.NewMouseEvent (new () { Position = new (6, 0), Flags = MouseFlags.Button1Pressed });
         win.NewMouseEvent (new () { Position = new (6, 0), Flags = MouseFlags.Button1Pressed });