In a nutshell, this makes everything on panel headers line up consistently both vertically and horizontally no matter what the user zoom.
As everything is scaled up from the default "1", all the contents of the header are increased in a linear fashion, but the height of it is not. This is because the header height is defined with a constant that is not also scaled. So at scale value "1" the header is 24 pixels high, but then when it is "2" it is 44, not 48. At scale amount "4" it is 84 not 96. This difference in the height of the header versus its content makes it difficult to keep consistent look and centering.
This patch fixes that issues and also a number of other areas with similar issues, where parts are placed with non-scaled values.
On the following image, the current formatting is on the left, while this patch makes it like the right. The first row is at scale value "1" but then magnified four times. The second row is scale value "2" then doubled. Third row is at scale value "4".
You should notice that there are some obvious issues on the left. The down arrow moves left to right, the checkbox creeps up, the text starts at a different location, and the grabber thing also moves. All these things stay consistent on the right.
The following is another example of how these subtle changes can make a big change:
If you look at the placement of "Objects" at the top. The current behavior shows the word crowded to the top of the window. With this patch it looks like the bottom of the image, with better breathing room around the word