Explorar o código

Flow: fix incorrect spacing calculation in auto-width/height

trethaller %!s(int64=2) %!d(string=hai) anos
pai
achega
90c27d249f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      h2d/Flow.hx

+ 2 - 2
h2d/Flow.hx

@@ -1238,7 +1238,7 @@ class Flow extends Object {
 			}
 
 			forChildren(function(i, p, c) {
-				autoWidth -= horizontalSpacing;
+				if(i > 0) autoWidth -= horizontalSpacing;
 				if(p.autoSize == null) {
 					calcSize(p, c);
 					if(!p.isAbsolute) {
@@ -1401,7 +1401,7 @@ class Flow extends Object {
 			}
 
 			forChildren(function(i, p, c) {
-				autoHeight -= verticalSpacing;
+				if(i > 0) autoHeight -= verticalSpacing;
 				if(p.autoSize == null) {
 					calcSize(p, c);
 					if(!p.isAbsolute) {