Sfoglia il codice sorgente

don't take twice the padding into account when we have a background

ncannasse 9 anni fa
parent
commit
a8556cbc24
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      h2d/Flow.hx

+ 1 - 1
h2d/Flow.hx

@@ -230,7 +230,7 @@ class Flow extends Sprite {
 			if( !isInline ) {
 			if( !isInline ) {
 				super.getBoundsRec(relativeTo, out, false);
 				super.getBoundsRec(relativeTo, out, false);
 				// TODO : use proper addBounds instead
 				// TODO : use proper addBounds instead
-				if( relativeTo == parent ) {
+				if( relativeTo == parent && background == null ) {
 					out.xMax += paddingRight + borderWidth;
 					out.xMax += paddingRight + borderWidth;
 					out.yMax += paddingBottom + borderHeight;
 					out.yMax += paddingBottom + borderHeight;
 				}
 				}