My old system is quite simple, but it does the job. Basically, each component (views in my old system) can declare it's preferred size. For something like a button, this would be based on the length of the text label, in the UI font size.
Then, I had a class that arranges views horizontally or vertically. You can mix and match the horizontal and vertical arrangements, so for example you could have 4 views arranged horizontally, and the second view could actually be a collection of 6 views that were arranged vertically.
When placing views into the vertical or horizontal layouts you can specify whether the views should use their preferred size or stretch to the available space, whether they should be left/right/center aligned, stuff like that.
Finally, the layouts then handle the final sizing and alignment of everything based on the child views and sub-layouts.
Like I said, it's quite simple, but to me it's a huge step beyond pixel placement. Plus, with sizing based on strings, it handles localization very well. If a button label in one language is "XXX", but in another language is "XXX XX XXXX X", that simply changes the view's preferred size and the layout objects take that into account when placing views. So a dialog may be a different size in different languages, but everything will still fit and be aligned relative to each other.