Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-12-19 12:34:53 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-12-19 12:34:53 +0400
commitdce82591a7504cac25bc53d4f92ca234bf85c3aa (patch)
tree800b9e4e27da0285788848b6e38675f2e6bae2eb /source/blender
parente915ecdfc4681b479c90349ef1d6338179071800 (diff)
Fix T37830: UILists text now right align.
Simply check for non-embossed TEX buttons inside uiList items, and align their text like labels do.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_widgets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 8c49d8c7a8b..5c2ce7ad635 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -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);
}