Browse Source

Disable AutoSize in SplitContainer test/scenario as it overspills parent bounds

tznind 2 years ago
parent
commit
62b98dcceb
2 changed files with 5 additions and 4 deletions
  1. 1 0
      UICatalog/Scenarios/SplitContainerNesting.cs
  2. 4 4
      UnitTests/SplitContainerTests.cs

+ 1 - 0
UICatalog/Scenarios/SplitContainerNesting.cs

@@ -140,6 +140,7 @@ namespace UICatalog.Scenarios {
 			return new Label {
 				Width = Dim.Fill (),
 				Height = 1,
+				AutoSize = false,
 				Text = number.ToString ().Repeat (1000),
 				CanFocus = true,
 			};

+ 4 - 4
UnitTests/SplitContainerTests.cs

@@ -583,10 +583,10 @@ namespace UnitTests {
 
 			container.IntegratedBorder = withBorder ? BorderStyle.Single : BorderStyle.None;
 
-			container.Panel1.Add (new Label (new string ('1', 100)));
-			container.Panel1.Add (new Label (new string ('1', 100)) { Y = 1});
-			container.Panel2.Add (new Label (new string ('2', 100)));
-			container.Panel2.Add (new Label (new string ('2', 100)) { Y = 1});
+			container.Panel1.Add (new Label (new string ('1', 100)) { Width = Dim.Fill(), Height = 1, AutoSize = false});
+			container.Panel1.Add (new Label (new string ('1', 100)) { Width = Dim.Fill (), Height = 1, AutoSize = false,Y = 1});
+			container.Panel2.Add (new Label (new string ('2', 100)) { Width = Dim.Fill (), Height = 1, AutoSize = false });
+			container.Panel2.Add (new Label (new string ('2', 100)) { Width = Dim.Fill (), Height = 1, AutoSize = false,Y = 1});
 
 			container.Panel1MinSize = 0;
 			container.Panel2MinSize = 0;