瀏覽代碼

LayoutVertical bug fix

Jean-David Moisan 6 年之前
父節點
當前提交
88891b9eec
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/LayoutVertical.cs

+ 2 - 2
Source/LayoutVertical.cs

@@ -17,12 +17,12 @@ namespace Apos.Gui {
             int width = Panel.Width;
             int height = Panel.Height;
 
-            int offsetY = position.Y;
+            int offsetY = 0;
             foreach (Component c in childs) {
                 int cHeight = c.PrefHeight;
                 c.Width = width;
                 c.Height = cHeight;
-                c.Position = new Point(position.X, offsetY) + Panel.Offset;
+                c.Position = new Point(position.X, offsetY + position.Y) + Panel.Offset;
                 offsetY += cHeight;
                 c.ClippingRect = c.ClipRectangle(Panel.ClippingRect);
             }