if anyone is looking into layout models, I can highly recommmend

Optimal GUI Layout as a Problem of Linear Programming
by Christof Lutteroth et al.

for a more formal take on the whole mess that is layouting.

If I were to implement something to do with layouts, this would be my
preferred approach. At least on modern machines, not necessarily for
embedded or small machines.