Layouting corner case?

Yes, those should always work and should not require clamping. If the layouts are behaving properly then those are both legal.

Currently, this is the case that may throw an error if the caller has asked the layout to do something that it cannot do. We can kind of decide if that’s the way we want it to behave.

Sometimes when one is developing a framework, they want to know about all of these errors. Sometimes users just want something to see without odd exceptions. Technically, users trump my desire here, really.

One other thing to consider, in all my years of developing UI layouts, swing wrappers, screen generators, etc… every time I tried to make things flexible to autolayout, most of my users preferred to specifically set the sizes of every thing. I find this to often be even MORE true in game development. Seems like it’s quite frequent that a screen would be mocked up in photoshop before code is ever written.

Dynamic resize and layout is something seen usually only in the more advanced “I’m implementing an OS in my game” sort of UIs. (Nothing wrong with that as some games require it but you know what I’m talking about.) It is heavily on my stack of touch stones that I not sacrifice too much simplicity to cover these cases. (Often those users will at best build custom stuff on Lemur’s base, anyway.)