Blender Git Loki

Git Commits -> Revision 133358f

Revision 133358f by Julian Eisel (soc-2021-curves)
June 21, 2021, 14:31 (GMT)
UI: Support right aligned non-shortcut hints in widgets

Widget drawing code already supported drawing right-aligned, grayed out
shortcut strings. This patch generalizes things a bit so this can also
be used to draw other hints in the same way. There have been a few
instances in the past where this would've been useful, D11046 being the
latest one.

Note that besides some manual regression testing, I didn't check if this
works yet, as there is no code actually using it (other than the
shortcuts). Can be checked as part of further development for D11046.

A possible further improvement would be providing a way to define how
clipping should be done. E.g. sometimes the right-aligned text should be
clipped first (because it's just a hint), in other cases it should be
left untouched (like current code explicitly does it for shortcuts).

Removes the `UI_BUT_HAS_SHORTCUT` flag, which isn't needed anymore.

Commit Details:

Full Hash: 133358f0ab784ae75ed49a1f1c1ad847d9110b08
Parent Commit: 7a4252d
Committed By: Dilith Jayakody
Lines Changed: +31, -34

5 Modified Paths:

/source/blender/editors/include/UI_interface.h (+3, -7) (Diff)
/source/blender/editors/interface/interface.c (+0, -1) (Diff)
/source/blender/editors/interface/interface_context_menu.c (+0, -1) (Diff)
/source/blender/editors/interface/interface_region_search.c (+19, -17) (Diff)
/source/blender/editors/interface/interface_widgets.c (+9, -8) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021