forked from enlightenment/enlightenment
some comp WIP on setting object color classes to handle opacity for windows...doesn't work right still because of focus clip
This commit is contained in:
parent
e3486bbc17
commit
c73a9e58c0
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue