panelcomponent: fix removing final gap from total width/height

This commit is contained in:
Adam
2020-03-14 13:21:51 -04:00
parent dd18626d15
commit 43998972cf

View File

@@ -163,8 +163,14 @@ public class PanelComponent implements LayoutableRenderableEntity
} }
// Remove last child gap // Remove last child gap
totalWidth -= gap.x; if (orientation == ComponentOrientation.HORIZONTAL)
totalHeight -= gap.y; {
totalWidth -= gap.x;
}
else // VERTICAL
{
totalHeight -= gap.y;
}
// Cache children bounds // Cache children bounds
childDimensions.setSize(totalWidth, totalHeight); childDimensions.setSize(totalWidth, totalHeight);