Merge remote-tracking branch 'refs/remotes/origin/v2_2491-Toplevel-Redesign' into v2_2491-Toplevel-Redesign

This commit is contained in:
Tig
2024-07-25 14:50:19 -06:00
140 changed files with 5801 additions and 5555 deletions

View File

@@ -97,7 +97,7 @@ public class LabelTests (ITestOutputHelper output)
top.Add (win);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
((FakeDriver)Application.Driver!).SetBufferSize (30, 5);
var expected = @"
┌────────────────────────────┐
@@ -137,7 +137,7 @@ public class LabelTests (ITestOutputHelper output)
top.Add (win);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
((FakeDriver)Application.Driver!).SetBufferSize (30, 5);
var expected = @"
┌────────────────────────────┐
@@ -383,7 +383,7 @@ e
Assert.False (label.IsInitialized);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
((FakeDriver)Application.Driver!).SetBufferSize (30, 5);
Assert.True (label.IsInitialized);
Assert.Equal ("Say Hello 你", label.Text);
@@ -415,7 +415,7 @@ e
Assert.False (label.IsInitialized);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
((FakeDriver)Application.Driver!).SetBufferSize (30, 5);
Assert.True (label.IsInitialized);
Assert.Equal ("Say Hello 你", label.Text);
@@ -850,7 +850,7 @@ e
Toplevel top = new ();
top.Add (win);
RunState rs = Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (40, 10);
((FakeDriver)Application.Driver!).SetBufferSize (40, 10);
Assert.Equal (29, label.Text.Length);
Assert.Equal (new (0, 0, 40, 10), top.Frame);
@@ -899,7 +899,7 @@ e
Toplevel top = new ();
top.Add (win);
RunState rs = Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (40, 10);
((FakeDriver)Application.Driver!).SetBufferSize (40, 10);
Assert.Equal (new (0, 0, 40, 10), top.Frame);
Assert.Equal (new (0, 0, 40, 10), win.Frame);
@@ -971,7 +971,7 @@ e
{
if (k.KeyCode == KeyCode.Enter)
{
((FakeDriver)Application.Driver).SetBufferSize (22, count + 4);
((FakeDriver)Application.Driver!).SetBufferSize (22, count + 4);
Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expecteds [count], output);
Assert.Equal (new (0, 0, 22, count + 4), pos);
@@ -1035,7 +1035,7 @@ e
[SetupFakeDriver]
public void Label_Height_Zero_Stays_Zero ()
{
((FakeDriver)Application.Driver).SetBufferSize (10, 4);
((FakeDriver)Application.Driver!).SetBufferSize (10, 4);
var text = "Label";
var label = new Label
@@ -1122,7 +1122,7 @@ e
{
if (k.KeyCode == KeyCode.Enter)
{
((FakeDriver)Application.Driver).SetBufferSize (22, count + 4);
((FakeDriver)Application.Driver!).SetBufferSize (22, count + 4);
Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expecteds [count], output);
Assert.Equal (new (0, 0, 22, count + 4), pos);
@@ -1197,7 +1197,7 @@ e
var top = new Toplevel ();
top.Add (win);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (10, 4);
((FakeDriver)Application.Driver!).SetBufferSize (10, 4);
Assert.Equal (5, text.Length);
Assert.Equal (new (0, 0, 5, 1), label.Frame);
@@ -1256,7 +1256,7 @@ e
var top = new Toplevel ();
top.Add (win);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (10, 4);
((FakeDriver)Application.Driver!).SetBufferSize (10, 4);
Assert.Equal (5, text.Length);
Assert.Equal (new (0, 0, 5, 1), label.Frame);