From f1297db423f2fb5554f90355c6fb9c1e54eacf2a Mon Sep 17 00:00:00 2001 From: tznind Date: Thu, 26 Jan 2023 08:16:56 +0000 Subject: [PATCH] Fixing layout issues --- Terminal.Gui/Views/SplitView.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Terminal.Gui/Views/SplitView.cs b/Terminal.Gui/Views/SplitView.cs index 59f58c1b3..a06e704f3 100644 --- a/Terminal.Gui/Views/SplitView.cs +++ b/Terminal.Gui/Views/SplitView.cs @@ -433,12 +433,12 @@ namespace Terminal.Gui { tile.View.X = i == 0 ? bounds.X : Pos.Right (splitterLines [i - 1]); tile.View.Y = bounds.Y; tile.View.Height = bounds.Height; - tile.View.Width = GetTileWidthOrHeight(i, bounds.Width); + tile.View.Width = GetTileWidthOrHeight(i, Bounds.Width); } else { tile.View.X = bounds.X; tile.View.Y = i == 0 ? 0 : Pos.Bottom (splitterLines [i - 1]); tile.View.Width = bounds.Width; - tile.View.Height = GetTileWidthOrHeight(i, bounds.Height); + tile.View.Height = GetTileWidthOrHeight(i, Bounds.Height); } } } @@ -453,7 +453,13 @@ namespace Terminal.Gui { var nextSplitter = splitterDistances [i].Anchor (space); var lastSplitter = i >= 1 ? splitterDistances [i-1].Anchor (space) : 0; - return nextSplitter - lastSplitter; + var distance = nextSplitter - lastSplitter; + + if(i>0) { + return distance - 1; + } + + return distance; } private void RespectMinimumTileSizes ()