I briefly looked at this back in the day. And you're absolutely correct on this.
We did a small investigation to what it would take to make GUI modding more dynamic, allow scaling and well.. get rid of hardcodedness in general.
But fortunately, the GUI is a surprisingly large monster that would have taken too much time to untangle and fix all hardcoded assumptions.
We even experimented with using Awesomium for new GUI elements, but the performance just wasn't there.
If only CoherentUI came around a few years earlier.
If a single element is holding you back on something though, you can always try poking Michi. He might be able to wiggle loose a few minutes from one of the coders.