Browse Source

Fix failing unit tests by updating MinSize expectations

tznind 2 years ago
parent
commit
3354cb5fdb
2 changed files with 4 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Views/SplitContainer.cs
  2. 3 0
      UnitTests/SplitContainerTests.cs

+ 1 - 1
Terminal.Gui/Views/SplitContainer.cs

@@ -175,7 +175,7 @@ namespace Terminal.Gui {
 
 					splitterPanels[0].Width = Dim.Fill ();
 					splitterPanels[0].Height = new Dim.DimFunc (() =>
-					splitterDistance.Anchor (Bounds.Height)) - 1;
+					splitterDistance.Anchor (Bounds.Height));
 
 					splitterPanels[1].Y = Pos.Bottom (splitterLine);
 					splitterPanels[1].X = 0;

+ 3 - 0
UnitTests/SplitContainerTests.cs

@@ -382,6 +382,9 @@ namespace UnitTests {
 
 			container.Panels [0].Add (new Label (new string ('1', 100)));
 			container.Panels [1].Add (new Label (new string ('2', 100)));
+			
+			container.Panels [0].MinSize = 0;
+			container.Panels [1].MinSize = 0;
 
 			Application.Top.Add (container);
 			container.ColorScheme = new ColorScheme ();