Describe the bug
The number of pixels expanded to the right is the same as the horizontal size of the insets.
To Reproduce
Add these code to the subclass of LightweightGuiDescription:
var root = new WBox(Axis.HORIZONTAL);
setRootPanel(root);
root.setSize(200, 240);
root.setInsets(Insets.ROOT_PANEL);
root.setHorizontalAlignment(HorizontalAlignment.RIGHT);
root.add(new WButton());
root.validate(this);
System.out.println(root.getWidth());
If horizontalAlignment is LEFT, the width is 200; If it's RIGHT, the width is 207.
Expected behavior
Fix the width of WBox.
Version of the (please complete the following information):
-LibGui 6.3.0
-Fabric api 0.61.0
-Minecraft 1.19.2
Additional context
This problem can be solved by moving the setSize call after validate.