Shirakumo / alloy

A new user interface protocol and toolkit implementation
https://shirakumo.github.io/alloy
zlib License
181 stars 12 forks source link

Layout rewrite #21

Closed Shinmera closed 2 years ago

Shinmera commented 2 years ago

Rewrite the layout system in Alloy to use relative positioning of components rather than absolute. Meaning: the xy bounds of a component are now offset from the layout-parent's position. This makes updating positions very cheap, most importantly when scrolling views.

However, it complicates intersection testing, specifically when testing for pointer events, and even more crucially, when doing visibility culling via extent-visible-p.

While at it there were also some minor improvements to the linear layouts and possibly others.

The following APIs were changed as part of the rewrite: