Fix T37830: UILists text now right align.

Simply check for non-embossed TEX buttons inside uiList items, and align their text like labels do.
This commit is contained in:
Bastien Montagne 2013-12-19 09:34:53 +01:00
parent e915ecdfc4
commit dce82591a7
Notes: blender-bot 2023-02-14 11:28:45 +01:00
Referenced by issue #37830, UILists text now right align
1 changed files with 4 additions and 0 deletions

View File

@ -1307,6 +1307,10 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
else if (ELEM(but->type, NUM, NUMSLI)) {
ui_text_clip_right_label(fstyle, but, rect);
}
/* Special hack for non-embossed TEX buttons in uiList (we want them to behave as much as possible as labels). */
else if ((but->type == TEX) && (but->flag & UI_BUT_LIST_ITEM) && (but->dt & UI_EMBOSSN)) {
but->ofs = 0;
}
else if (ELEM3(but->type, TEX, SEARCH_MENU, SEARCH_MENU_UNLINK)) {
ui_text_clip_left(fstyle, but, rect);
}