diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-31 20:40:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-31 20:40:14 +0400 |
commit | d191dec1d5a938c0d7d2950f5140a4811627602e (patch) | |
tree | 98ff9533c6f67255592a280dcd85b491172cf28b /source/blender/editors/space_text/text_draw.c | |
parent | dd62a2c3756d4335479a561a52468a548f2f1d65 (diff) |
syntax highlight autocomplete listing.
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index a26b4f56e02..c264368e714 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -957,7 +957,7 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) SuggItem *item, *first, *last, *sel; TextLine *tmp; char str[SUGG_LIST_WIDTH + 1]; - int w, boxw = 0, boxh, i, l, x, y, b, *top; + int w, boxw = 0, boxh, i, l, x, y, *top; const int lheight = st->lheight_dpi + TXT_LINE_SPACING; const int margin_x = 2; @@ -1014,18 +1014,8 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) UI_ThemeColor(TH_SHADE2); glRecti(x + margin_x, y - 3, x + margin_x + w, y + lheight - 3); } - b = 1; /* b=1 color block, text is default. b=0 no block, color text */ - switch (item->type) { - case 'k': UI_ThemeColor(TH_SYNTAX_B); b = 0; break; - case 'm': UI_ThemeColor(TH_TEXT); break; - case 'f': UI_ThemeColor(TH_SYNTAX_L); break; - case 'v': UI_ThemeColor(TH_SYNTAX_N); break; - case '?': UI_ThemeColor(TH_TEXT); b = 0; break; - } - if (b) { - glRecti(x + 8, y + 2, x + 11, y + 5); - UI_ThemeColor(TH_TEXT); - } + + format_draw_color(item->type); text_draw(st, str, 0, 0, 1, x + margin_x, y - 1, NULL); if (item == last) break; |