[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42247] trunk/blender/source/blender/ editors/space_outliner/outliner_draw.c: Fix #29443: Outliner buttons hover on shrink
Sergey Sharybin
sergey.vfx at gmail.com
Tue Nov 29 09:36:39 CET 2011
Revision: 42247
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42247
Author: nazgul
Date: 2011-11-29 08:36:24 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
Fix #29443: Outliner buttons hover on shrink
Issue was caused by drawing icon instead of button due to column clip.
This icons was drawing without taking icons' alpha into account.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
Modified: trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_draw.c 2011-11-29 06:58:16 UTC (rev 42246)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_draw.c 2011-11-29 08:36:24 UTC (rev 42247)
@@ -893,9 +893,11 @@
static void tselem_draw_icon_uibut(struct DrawIconArg *arg, int icon)
{
/* restrict collumn clip... it has been coded by simply overdrawing, doesnt work for buttons */
- if(arg->x >= arg->xmax)
- UI_icon_draw(arg->x, arg->y, icon);
- else {
+ if(arg->x >= arg->xmax) {
+ glEnable(GL_BLEND);
+ UI_icon_draw_aspect(arg->x, arg->y, icon, 1.0f, arg->alpha);
+ glDisable(GL_BLEND);
+ } else {
/* XXX investigate: button placement of icons is way different than UI_icon_draw? */
float ufac= UI_UNIT_X/20.0f;
uiBut *but= uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : "");
More information about the Bf-blender-cvs
mailing list