From 3612a8d3d4605cac1988d58b8af561e69f4130ab Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 30 Nov 2011 06:03:10 +0000 Subject: Deduplicate code used for drawing text information at the top of space region. --- source/blender/editors/space_clip/clip_draw.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'source/blender/editors/space_clip/clip_draw.c') diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index a53da4ce006..3f9ec3f3c82 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -204,29 +204,8 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar) strcpy(str, "Locked"); } - if(str[0]) { - uiStyle *style= UI_GetStyle(); - int fontid= style->widget.uifont_id; - int fontwidth; - - BLF_size(fontid, 11.0f, 72); - - if(block) - fontwidth= ar->winx; - else - fontwidth= BLF_width(fontid, str); - - glEnable(GL_BLEND); - - glColor4f(0.0f, 0.0f, 0.0f, 0.6f); - glRecti(0, ar->winy-17, fontwidth+12, ar->winy); - - glColor3f(1.0f, 1.0f, 1.0f); - BLF_position(fontid, 6.0f, ar->winy-13.0f, 0.0f); - BLF_draw(fontid, str, strlen(str)); - - glDisable(GL_BLEND); - } + if(str[0]) + ED_region_info_draw(ar, str, block, 0.6f); } static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, -- cgit v1.2.3