[owo-ui] Sizing with 'extend' considers the 'gap' of FlowLayout as free space
Zailer43 opened this issue · 1 comments
Description
When using a FlowLayout with a gap, if one of the components within it uses sizing with the 'extend' method, it will detect the gap as empty, causing the component to become too large. This doesn't happen if margins are used instead of a gap.
Code
<!-- expand + gap, bug -->
<flow-layout direction="horizontal">
<children>
<flow-layout direction="vertical">
<children>
<!-- ... -->
</children>
<sizing>
<vertical method="fixed">20</vertical>
<horizontal method="fixed">20</horizontal>
</sizing>
<surface>
<panel/>
</surface>
</flow-layout>
<flow-layout direction="vertical">
<children>
<!-- ... -->
</children>
<sizing>
<vertical method="fixed">20</vertical>
<horizontal method="expand">100</horizontal>
</sizing>
<surface>
<panel/>
</surface>
</flow-layout>
</children>
<gap>10</gap>
</flow-layout>
<!-- margins -->
<flow-layout direction="horizontal">
<children>
<flow-layout direction="vertical">
<children>
<!-- ... -->
</children>
<sizing>
<vertical method="fixed">20</vertical>
<horizontal method="fixed">20</horizontal>
</sizing>
<surface>
<panel/>
</surface>
<margins>
<right>10</right>
</margins>
</flow-layout>
<flow-layout direction="vertical">
<children>
<!-- ... -->
</children>
<sizing>
<vertical method="fixed">20</vertical>
<horizontal method="expand">100</horizontal>
</sizing>
<surface>
<panel/>
</surface>
</flow-layout>
</children>
</flow-layout>
Versions
owo_version=0.12.5+1.20.3
minecraft_version=1.20.4
fabric_version=0.96.4+1.20.4
Fixed in 0.12.6, thanks for reporting!
Cheers