Page MenuHome

Inconsistent Button Widths

Authored by Harley Acheson (harley) on Dec 17 2018, 12:01 AM.



When a button has no text and no menu it is "UI_UNIT_X" wide. When that button works as a pulldown menu then it needs to be a bit wider to fit the "down" arrow shown to the right. For most of these types of buttons, the increase is 0.6 of a UI_UNIT_X, since that part is not very wide.

However, there are few of these that are wider than the others. In the image below, the top row shows how it is now, with some buttons (marked in red) that are wider than they need to be and are inconsistent with the others. The row on the bottom shows how they look after this patch is applied

I think the reason this happened is when these were added it was not noticed that they were center aligned, rather than left-aligned. In that state, when made the normal width the icons are placed too far to the left and looks crowded. This patch changes the alignment to match the others and also changes the width to match the others. So both the button width and the icon placement match all the rest.

Diff Detail

rB Blender

Event Timeline

Just a note that this issue was mentioned in the devTalk "Blender UI paper cuts" on November 16 and
received 19 "LIkes"...

Yes, this is nice I think. Saves a bit of header space too.

This revision is now accepted and ready to land.Dec 24 2018, 1:14 AM
This revision was automatically updated to reflect the committed changes.