Fixes #3951. Add DimFuncWithView with a View dependency

This commit is contained in:
BDisp
2025-07-25 03:06:49 +01:00
parent f9202c5594
commit b6d0aefd9b
27 changed files with 166 additions and 36 deletions

View File

@@ -232,6 +232,7 @@ public class ButtonTests (ITestOutputHelper output)
Assert.True (btn.CanFocus);
Application.Driver?.ClearContents ();
btn.Layout ();
btn.Draw ();
expected = @$"

View File

@@ -14,7 +14,7 @@ public class ColorPicker16Tests
colorPicker.BeginInit ();
colorPicker.EndInit ();
colorPicker.LayoutSubViews ();
colorPicker.Layout ();
Assert.Equal (new (0, 0, 32, 4), colorPicker.Frame);
}

View File

@@ -675,7 +675,7 @@ public class ColorPickerTests
// Switch to HSV
cp.Style.ColorModel = ColorModel.HSV;
cp.ApplyStyleChanges ();
cp.Layout ();
cp.Draw ();
ColorBar h = GetColorBar (cp, ColorPickerPart.Bar1);

View File

@@ -1053,7 +1053,7 @@ e
win.Add (label);
win.BeginInit ();
win.EndInit ();
win.LayoutSubViews ();
win.Layout ();
win.Draw ();
Assert.Equal (5, text.Length);

View File

@@ -2130,6 +2130,7 @@ wo
Assert.True (menu.NewKeyDownEvent (menu.Key));
Assert.True (menu.IsMenuOpen);
View.SetClipToScreen ();
top.Layout ();
top.Draw ();
DriverAssert.AssertDriverContentsAre (expectedMenu.ExpectedSubMenuOpen (0), output);

View File

@@ -12,7 +12,7 @@ public class ProgressBarTests
var pb = new ProgressBar ();
pb.BeginInit ();
pb.EndInit ();
pb.Layout ();
Assert.False (pb.CanFocus);
Assert.Equal (0, pb.Fraction);
@@ -32,7 +32,7 @@ public class ProgressBarTests
pb.BeginInit ();
pb.EndInit ();
pb.LayoutSubViews ();
pb.Layout ();
for (var i = 0; i <= pb.Frame.Width; i++)
{
@@ -174,7 +174,7 @@ public class ProgressBarTests
pb.BeginInit ();
pb.EndInit ();
pb.LayoutSubViews ();
pb.Layout ();
for (var i = 0; i < 38; i++)
{
@@ -879,7 +879,7 @@ public class ProgressBarTests
pb.BeginInit ();
pb.EndInit ();
pb.LayoutSubViews ();
pb.Layout ();
for (var i = 0; i < 38; i++)
{

View File

@@ -514,6 +514,7 @@ public class SliderTests
view.Add (slider);
view.BeginInit ();
view.EndInit ();
view.Layout ();
Size expectedSize = slider.Frame.Size;
@@ -547,6 +548,7 @@ public class SliderTests
view.Add (slider);
view.BeginInit ();
view.EndInit ();
view.Layout ();
Size expectedSize = slider.Frame.Size;
@@ -580,6 +582,7 @@ public class SliderTests
view.Add (slider);
view.BeginInit ();
view.EndInit ();
view.Layout ();
Size expectedSize = slider.Frame.Size;

View File

@@ -1673,6 +1673,7 @@ Les Miśerables",
var tf = new TextField { Width = 5, Text = "\u001b" };
tf.BeginInit ();
tf.EndInit ();
tf.Layout ();
tf.Draw ();
DriverAssert.AssertDriverContentsWithFrameAre ("\u241b", output);

View File

@@ -819,6 +819,10 @@ public class TileViewTests (ITestOutputHelper output)
Assert.Equal (1, myReusableView.DisposalCount);
}
);
Assert.NotNull (Application.Top);
Application.Top.Dispose ();
Application.Shutdown ();
}
[Theory]
@@ -848,6 +852,10 @@ public class TileViewTests (ITestOutputHelper output)
Assert.True (myReusableView.DisposalCount >= 1);
}
);
Assert.NotNull (Application.Top);
Application.Top.Dispose ();
Application.Shutdown ();
}
[Fact]