Blender Git Commit Log

Git Commits -> Revision c7d94a7

Revision c7d94a7 by Campbell Barton (master)
September 28, 2021, 04:36 (GMT)
UI: avoid excessive padding for labels in headers

Labels in headers reserved space for an icon even when no icon was used.

This is caused by the shared function ui_text_icon_width adding 1.5x
a buttons X-units width the the width of the string.

Menu buttons detected this and subtracted the extra padding.

Instead of adding the same workaround for labels,
add ui_text_icon_width_ex that takes a padding argument.

Add presets for 'default', 'compact' and 'none' to avoid duplicating
padding values.

This allows removal of hard-coded label scaling for the add-object tool.

Commit Details:

Full Hash: c7d94a7827a5be9343eea22a9638bb059f185206
Parent Commit: 986d604
Lines Changed: +57, -18

2 Modified Paths:

/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py (+0, -4) (Diff)
/source/blender/editors/interface/interface_layout.c (+57, -14) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021