Browse Source

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

tznind 2 years ago
parent
commit
62b98dcceb

+ 1 - 0
UICatalog/Scenarios/SplitContainerNesting.cs

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

+ 4 - 4
UnitTests/SplitContainerTests.cs

@@ -583,10 +583,10 @@ namespace UnitTests {
 
 
 			container.IntegratedBorder = withBorder ? BorderStyle.Single : BorderStyle.None;
 			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.Panel1MinSize = 0;
 			container.Panel2MinSize = 0;
 			container.Panel2MinSize = 0;