Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-06-29 13:44:08 +0400
committerTon Roosendaal <ton@blender.org>2006-06-29 13:44:08 +0400
commit5dac88dc58e362a58dcd7fb6df1537fb9949b4a7 (patch)
tree351a055216e8869d077b1a883b006b4092802586 /source/blender/src/drawaction.c
parente5b3fb85e49651cc6fd928b1945e1f0e5fdc9235 (diff)
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!
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r--source/blender/src/drawaction.c4
1 files changed, 2 insertions, 2 deletions
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);
}
}