This is less of an actual patch, and more of a way to expose existing errors. This will add a Line Height property to Preferences, which will be set to 2.0 (twice normal height) by default. So the height of each line (and header) will be twice as tall as usual.
First, why might we (eventually) want a user-specified line-height?
It is for typographical correction. If you imagine swapping out our current font for another one, like Noto Sans, there will be slight differences in font metrics that might make us want to slightly change the line height in order for it to look right. At extremes, when the UI is primarily Chinese characters - which have a squat profile - you might want to increase the UI scale but decrease the line height. Similarly, using an Arabic font - which are typically tall and thin - you might want to decrease scale but increase line height. At even further extremes we have some users who would use this for accessibility reasons.
What kinds of errors need correcting?
Right now we layout UI items that are based (sort of) on a horizontal measure of UI_UNIT_X and a vertical measure of UI_UNIT_Y, both of which are uniformly scaled. Unfortunately both values are the same - 20. So any time we use one where we should use the other we introduce an error that is not visible now, but would be visible if line height were ever changed. Some examples:
The following shows scene and layer selectors with 1X and 2X line height. You see some arrows that get misplaced and one icon displayed incorrectly:
Similarly, this shows some elements displaying double-height correctly while others a bit off:
Some parts of Outliner not vertically centering some elements, but doing others quite well:
But overall we are in fairly good shape with just minor corrections needed:
Hopefully I can get to these things over the next little while and I can point to this page to justify fixing something that doesn't currently look broken.,



