shdwcat / YUI

YUI - A UI system for GMS2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename current panel/layout 'stretch' behavior to CSS 'fit-content' and make 'stretch' match the equivalent WPF behavior

shdwcat opened this issue · comments

Currently alignment: stretch works more like https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content. If a vertical list of items has horizontal alignment as 'stretch', each item will be sized to the maximum width of the items in the list. In WPF however, stretch means to fill the entire available width or height (and YUI 'stretch' was intended to match this behavior). The current behavior is very useful though, so it should be preserved under the name 'fit-content'.

Fixed in 6d4e799 in a different way -- the new behavior is that stretch alignment matches the fit-content when the associated panel size is "auto", and will fully stretch to fill the available space when the associated size is explicit or "stretch". This gives the best of both worlds without having to complicate the API with further options