focustense / StardewUI

UI/widget library for Stardew modding
MIT License
5 stars 1 forks source link

Grid last row misaligned when using flexible width with item-layout count #20

Closed Mushymato closed 3 weeks ago

Mushymato commented 1 month ago

When using a grid with item-layout="count: 6" with non-fixed width layout, the final row is misaligned

<grid layout="64px content" item-layout="count: 6" horizontal-item-alignment="middle">
    <image *repeat={AllCrops} sprite={Seed} focusable="true" click=|^SelectThisCrop(this)| layout="64px 64px" />
</grid>

image

focustense commented 1 month ago

This might be partly because 64px is simply a nonsensical width for the entire grid (it's intended to be the item/column width, but specified here as the whole grid width). I'll have to check to see if the same issue occurs with a grid that's correctly horizontally sized.

Either way it's definitely a bug in the grid layout.