mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
* Fixes #1973. Avoid positioning Submenus off screen. * Firstly avoids negative positions on the sub-menus and then avoids the bottom not exceeding the console height, as possible.
This commit is contained in:
@@ -670,7 +670,7 @@ Edit
|
||||
|
||||
menu.CloseAllMenus ();
|
||||
menu.Frame = new Rect (0, 0, menu.Frame.Width, menu.Frame.Height);
|
||||
((FakeDriver)Application.Driver).SetBufferSize (7, 4);
|
||||
((FakeDriver)Application.Driver).SetBufferSize (7, 3);
|
||||
menu.OpenMenu ();
|
||||
Application.Refresh ();
|
||||
|
||||
@@ -681,7 +681,7 @@ Edit
|
||||
";
|
||||
|
||||
pos = GraphViewTests.AssertDriverContentsWithFrameAre (expected, output);
|
||||
Assert.Equal (new Rect (0, 1, 7, 3), pos);
|
||||
Assert.Equal (new Rect (0, 0, 7, 3), pos);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
|
||||
Reference in New Issue
Block a user