Rebased onto v2_2491-Overlapped

This commit is contained in:
Tig
2024-09-24 09:50:52 -06:00
104 changed files with 3808 additions and 2129 deletions

View File

@@ -170,6 +170,7 @@ public class MenuBarTests (ITestOutputHelper output)
Assert.True (menu.NewKeyDownEvent (menu.Key));
Assert.True (menu.IsMenuOpen);
top.Dispose ();
}
[Fact]
@@ -314,7 +315,7 @@ public class MenuBarTests (ITestOutputHelper output)
}
[Fact]
[AutoInitShutdown]
[AutoInitShutdown (configLocation: ConfigurationManager.ConfigLocations.DefaultOnly)]
public void Disabled_MenuBar_Is_Never_Opened ()
{
Toplevel top = new ();
@@ -340,7 +341,7 @@ public class MenuBarTests (ITestOutputHelper output)
}
[Fact]
[AutoInitShutdown]
[AutoInitShutdown (configLocation: ConfigurationManager.ConfigLocations.DefaultOnly)]
public void Disabled_MenuItem_Is_Never_Selected ()
{
var menu = new MenuBar
@@ -455,6 +456,8 @@ public class MenuBarTests (ITestOutputHelper output)
Window.DefaultBorderStyle = LineStyle.Single;
Dialog.DefaultButtonAlignment = Alignment.Center;
Dialog.DefaultBorderStyle = LineStyle.Single;
Dialog.DefaultShadow = ShadowStyle.None;
Button.DefaultShadow = ShadowStyle.None;
Toplevel top = new ();
var win = new Window ();
@@ -684,12 +687,14 @@ public class MenuBarTests (ITestOutputHelper output)
[AutoInitShutdown]
public void Draw_A_Menu_Over_A_Top_Dialog ()
{
((FakeDriver)Application.Driver).SetBufferSize (40, 15);
// Override CM
Window.DefaultBorderStyle = LineStyle.Single;
Dialog.DefaultButtonAlignment = Alignment.Center;
Dialog.DefaultBorderStyle = LineStyle.Single;
((FakeDriver)Application.Driver).SetBufferSize (40, 15);
Dialog.DefaultShadow = ShadowStyle.None;
Button.DefaultShadow = ShadowStyle.None;
Assert.Equal (new (0, 0, 40, 15), Application.Driver?.Clip);
TestHelpers.AssertDriverContentsWithFrameAre (@"", output);