浏览代码

Fixing layout issues

tznind 2 年之前
父节点
当前提交
f1297db423
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      Terminal.Gui/Views/SplitView.cs

+ 9 - 3
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 ()