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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-11-29 12:36:24 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-29 12:36:24 +0400
commita50795408425976396cddbe4fdadcebc579bc358 (patch)
tree008525c7b5dce71c07179607a9a47dea34bf7c1e /source/blender/editors/space_outliner/outliner_draw.c
parent3f57c06c7b8f01e16109c8bdbaba9643fe380d3c (diff)
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.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index cf9bf3de1b8..86031ca7104 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -893,9 +893,11 @@ struct DrawIconArg {
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 : "");