diff options
author | Ton Roosendaal <ton@blender.org> | 2006-06-29 13:44:08 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-06-29 13:44:08 +0400 |
commit | 5dac88dc58e362a58dcd7fb6df1537fb9949b4a7 (patch) | |
tree | 351a055216e8869d077b1a883b006b4092802586 /source/blender/src/drawimage.c | |
parent | e5b3fb85e49651cc6fd928b1945e1f0e5fdc9235 (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/drawimage.c')
-rw-r--r-- | source/blender/src/drawimage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 7eb30880bdc..dcf880df300 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -674,16 +674,16 @@ static void draw_image_view_icon(void) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); if(G.sima->flag & SI_STICKYUVS) { - BIF_icon_draw(xPos, 5.0, ICON_STICKY2_UVS); + BIF_icon_draw_aspect(xPos, 5.0, ICON_STICKY2_UVS, 1.0f); xPos = 25.0; } else if(!(G.sima->flag & SI_LOCALSTICKY)) { - BIF_icon_draw(xPos, 5.0, ICON_STICKY_UVS); + BIF_icon_draw_aspect(xPos, 5.0, ICON_STICKY_UVS, 1.0f); xPos = 25.0; } if(G.sima->flag & SI_SELACTFACE) { - BIF_icon_draw(xPos, 5.0, ICON_DRAW_UVFACES); + BIF_icon_draw_aspect(xPos, 5.0, ICON_DRAW_UVFACES, 1.0f); } glBlendFunc(GL_ONE, GL_ZERO); |