@ccc or anyone else, any remarks or suggesting to tighten up the make_view_rects function. I really like it. And I think that it only returns Rects rancher than creating views it's self is more appealing.
There are 2 issues I can see. One is the view param. This is a leftover, a ui.Rect should be passed in stead of the view. The other is that the margins give the right distance between the items. But if vert=True, the top and bottom margin is / 2. same goes when you go horizontally. I am not sure the result is entirely incorrect. I think more often than not you would want that result.
Anyway, happy to listen to any feed back if anyone has some.