Hi, 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. https://www.se.auckland.ac.nz/research/trReports/details/?tid=UoA-SE-2007-6 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. Robby