kas-gui / kas

Another GUI toolkit
Apache License 2.0
893 stars 27 forks source link

Stretch model (usage of excess space) #349

Open dhardy opened 1 year ago

dhardy commented 1 year ago

Consider modifying Stretch and SizeRules::solve_seq.

Status quo: a few named Stretch levels; only widgets of the highest level get extra space (excess is split evenly).

Possible alternative: use numeric Stretch levels (up to some maximum). Use exponential weighting: base ^ level for some base; divide up excess space according to these weights and have solve_seq progressively move towards these targets (but such that widths are only shrunk or grown by a single call; no direct redistribution).