From c73a9e58c0380eaa4c503127230cf8f9445d5af3 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 25 Feb 2013 10:02:57 +0000 Subject: [PATCH] some comp WIP on setting object color classes to handle opacity for windows...doesn't work right still because of focus clip --- data/themes/colorclasses.edc | 4 ++++ data/themes/edc/comp.edc | 12 +++++++++++- src/bin/e_comp.c | 12 +++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/data/themes/colorclasses.edc b/data/themes/colorclasses.edc index a02530b6e..0485f85f0 100644 --- a/data/themes/colorclasses.edc +++ b/data/themes/colorclasses.edc @@ -4,4 +4,8 @@ color_classes { color: 255 255 255 255; color3: 0 0 0 0; } + color_class { + name: "comp_alpha"; + color: 255 255 255 255; + } } diff --git a/data/themes/edc/comp.edc b/data/themes/edc/comp.edc index bc094dc1e..7f0831d7b 100644 --- a/data/themes/edc/comp.edc +++ b/data/themes/edc/comp.edc @@ -308,10 +308,20 @@ group { name: "e/comp/default"; rel2.relative: 1.0 1.0; } } - part { name: "focus-clipper"; + part { name: "trans-clipper"; type: RECT; clip_to: "clipper"; mouse_events: 0; + description { state: "default" 0.0; + color_class: "comp_alpha"; + rel1.to: "clipper"; + rel2.to: "clipper"; + } + } + part { name: "focus-clipper"; + type: RECT; + clip_to: "trans-clipper"; + mouse_events: 0; description { state: "default" 0.0; color_class: "comp_focus-out_color"; rel1.to: "clipper"; diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 7cd2046c5..6d52c36ff 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -5170,7 +5170,17 @@ e_comp_win_opacity_set(E_Comp_Win *cw, unsigned int opacity) if (cw->opacity_set_timer) ecore_timer_reset(cw->opacity_set_timer); else cw->opacity_set_timer = ecore_timer_add(5.0, (Ecore_Task_Cb)_e_comp_opacity_set_timer_cb, cw); } - evas_object_color_set(cw->shobj, cw->opacity, cw->opacity, cw->opacity, cw->opacity); + if (cw->opacity == 255) + { + edje_object_color_class_del(cw->shobj, "comp_alpha"); + } + else + { + edje_object_color_class_set(cw->shobj, "comp_alpha", + 255, 255, 255, cw->opacity, + 255, 255, 255, cw->opacity, + 255, 255, 255, cw->opacity); + } } EAPI void