From 3bed4cbf2b4c09dcb62197b8a8c4ec4224abc8b7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Dec 2010 03:59:22 +0000 Subject: fix [#25283] Edge length display difficult to read - made theme colors for mesh edge len & face angle/area display. - use %g rather then %f for float display, trims unneeded zeros. - store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context. - use unsigned char for more color functions, avoids casting to glColorubv(). --- source/blender/editors/space_console/console_draw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_console') diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c index d4d1429530c..0bb0d78a497 100644 --- a/source/blender/editors/space_console/console_draw.c +++ b/source/blender/editors/space_console/console_draw.c @@ -59,16 +59,16 @@ static void console_line_color(unsigned char fg[3], int type) { switch(type) { case CONSOLE_LINE_OUTPUT: - UI_GetThemeColor3ubv(TH_CONSOLE_OUTPUT, (char *)fg); + UI_GetThemeColor3ubv(TH_CONSOLE_OUTPUT, fg); break; case CONSOLE_LINE_INPUT: - UI_GetThemeColor3ubv(TH_CONSOLE_INPUT, (char *)fg); + UI_GetThemeColor3ubv(TH_CONSOLE_INPUT, fg); break; case CONSOLE_LINE_INFO: - UI_GetThemeColor3ubv(TH_CONSOLE_INFO, (char *)fg); + UI_GetThemeColor3ubv(TH_CONSOLE_INFO, fg); break; case CONSOLE_LINE_ERROR: - UI_GetThemeColor3ubv(TH_CONSOLE_ERROR, (char *)fg); + UI_GetThemeColor3ubv(TH_CONSOLE_ERROR, fg); break; } } @@ -171,7 +171,7 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha } /* cursor */ - UI_GetThemeColor3ubv(TH_CONSOLE_CURSOR, (char *)fg); + UI_GetThemeColor3ubv(TH_CONSOLE_CURSOR, fg); glColor3ubv(fg); glRecti( (xy[0] + pen[0]) - 1, -- cgit v1.2.3