From 490616d5bdf653a7ad39917067f64e53518c203d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 23 Jan 2011 19:20:10 +0000 Subject: [PATCH] Small fix for text input buttons: Number buttons, in text input mode, now also align internally like text buttons. --- source/blender/editors/interface/interface_widgets.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 4224b0b080f..b62108136be 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1110,7 +1110,10 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB if(but==NULL) return; /* clip but->drawstr to fit in available space */ - if (ELEM4(but->type, NUM, NUMABS, NUMSLI, SLI)) { + if (but->editstr && but->pos >= 0) { + ui_text_leftclip(fstyle, but, rect); + } + else if (ELEM4(but->type, NUM, NUMABS, NUMSLI, SLI)) { ui_text_label_rightclip(fstyle, but, rect); } else if (ELEM(but->type, TEX, SEARCH_MENU)) {