Page MenuHome

Panel Header Alignment Issues
ClosedPublic

Authored by Harley Acheson (harley) on Sun, Jan 6, 11:20 PM.

Details

Summary

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

Diff Detail

Repository
rB Blender

Event Timeline

And If we do accept this patch then we are getting a much nicer alignment of the header names, whether they have checkmarks or not. Which mean that afterward I can submit a very small patch that aligns subpanels nicer:

In the image above you can see that the second-level panel triangles are aligning with the text of parents.

Harley Acheson (harley) edited the summary of this revision. (Show Details)Mon, Jan 7, 3:38 AM
This revision is now accepted and ready to land.Mon, Jan 14, 3:25 PM

Seems reasonable to indent the subpanels a bit more, it might be a bit too subtle now.

This revision was automatically updated to reflect the committed changes.