From 5dac88dc58e362a58dcd7fb6df1537fb9949b4a7 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 29 Jun 2006 09:44:08 +0000 Subject: Bugfix from own testing: In outliner, the icons sometimes were drawing too large or too small. Same happened in NLA, Action, Image window etc. And it happened for "International fonts" when set to use 'texture drawing'. Reason: the API call for setting icon size BIF_icon_set_aspect() was not used consistantly. Sometimes it was set, sometimes not. And even worse, for every icon drawn in UI buttons, the icon lookup had to be done twice because of the aspect function. Solved it by removing this call, and adding a new function: BIF_icon_draw_aspect() The old BIF_icon_draw() call now draws with aspect 1.0 always. The icons code already had optimal checking for changed sizes, zo a change in aspect won't result in much cpu overhead. Plus it saves calling icons lookup code, which will make it all a bit faster. Andrea: I've added this aspect function a long while ago, I think you also like it better how it is now? Please check! --- source/blender/src/drawaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/src/drawaction.c') diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 0a4f52b6174..a76db77ef22 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -788,8 +788,8 @@ static void draw_keylist(gla2DDrawInfo *di, int totvert, BezTriple **blist, floa gla2DDrawTranslatePt(di, blist[v]->vec[1][0], ypos, &sc_x, &sc_y); // draw_key_but(sc_x-5, sc_y-6, 13, 13, (blist[v]->f2 & 1)); - if(blist[v]->f2 & 1) BIF_icon_draw_blended(sc_x-7, sc_y-6, ICON_SPACE2, TH_HEADER, 0); - else BIF_icon_draw_blended(sc_x-7, sc_y-6, ICON_SPACE3, TH_HEADER, 0); + if(blist[v]->f2 & 1) BIF_icon_draw_aspect(sc_x-7, sc_y-6, ICON_SPACE2, 1.0f); + else BIF_icon_draw_aspect(sc_x-7, sc_y-6, ICON_SPACE3, 1.0f); } } -- cgit v1.2.3