nicbarker / clay

High performance UI layout library in C.
https://nicbarker.com/clay
zlib License
1.29k stars 31 forks source link

[BUG] Wrong aligment of children inside Scroll element #39

Closed SogoCZE closed 1 month ago

SogoCZE commented 1 month ago

A vertical scroll element aligns its children incorrectly along the vertical axis. In this example, align is set to TOP but the Scroll Element aligns to the bottom.

image

nicbarker commented 1 month ago

Thanks for the report, luckily I caught this one while working on the new multi configs and haven't backported it 🙂 It was due to a bug in how the min / max scroll offset was calculated when the container itself was larger than its contents, fixed here: https://github.com/nicbarker/clay/commit/c3f2baf40a6fc0596bae8e90734f96cce06bd7d1 Let me know if it works for you!

SogoCZE commented 1 month ago

https://github.com/nicbarker/clay/commit/c3f2baf40a6fc0596bae8e90734f96cce06bd7d1 indeed fixed it!