Răsfoiți Sursa

LayoutVertical bug fix

Jean-David Moisan 6 ani în urmă
părinte
comite
88891b9eec
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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);
             }