discomfitor pushed a commit to branch master.

commit c73a9e58c0380eaa4c503127230cf8f9445d5af3
Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Feb 25 10:02:57 2013 +0000

    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 a02530b..0485f85 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 bc094dc..7f0831d 100644
--- a/data/themes/edc/comp.edc
+++ b/data/themes/edc/comp.edc
@@ -308,11 +308,21 @@ 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";
             rel2.to: "clipper";
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 7cd2046..6d52c36 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

-- 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

Reply via email to