ConsoleDriver now uses Region for Clip.

Still only rectangular regions.
All tests pass.
This commit is contained in:
Tig
2024-10-27 23:18:38 -07:00
parent d92ef0fd7b
commit 844179b1bd
17 changed files with 57 additions and 54 deletions

View File

@@ -132,7 +132,7 @@ public class ContextMenuTests (ITestOutputHelper output)
{
((FakeDriver)Application.Driver!).SetBufferSize (20, 15);
Assert.Equal (new Rectangle (0, 0, 20, 15), Application.Driver?.Clip);
Assert.Equal (new Rectangle (0, 0, 20, 15), Application.Driver?.Clip.GetBounds ());
TestHelpers.AssertDriverContentsWithFrameAre ("", output);
var top = new Toplevel { X = 2, Y = 2, Width = 15, Height = 4 };
@@ -268,7 +268,7 @@ public class ContextMenuTests (ITestOutputHelper output)
{
((FakeDriver)Application.Driver!).SetBufferSize (20, 15);
Assert.Equal (new Rectangle (0, 0, 20, 15), Application.Driver?.Clip);
Assert.Equal (new Rectangle (0, 0, 20, 15), Application.Driver?.Clip.GetBounds ());
TestHelpers.AssertDriverContentsWithFrameAre ("", output);
// Don't use Dialog here as it has more layout logic. Use Window instead.