forked from enlightenment/efl
Evas smart: Mark all smart clippers as no_render
This allows doing ugly things such as setting a clipper/mask on any smart object, without having to worry about seeing a white rectangle cover the whole screen. While the above scenario is not a great idea (bypass elementary in its handling of the clipper), having a big white rect covering the entire UI seems even worse. I wonder if elm objects shouldn't simply allow user clippers, and somehow manage them along with the smart object internal clipper.
This commit is contained in:
parent
f57da20b88
commit
df03631ef6
|
@ -682,9 +682,20 @@ EOLIAN static void
|
|||
_evas_object_smart_smart_no_render_set(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, Eina_Bool hide)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj2;
|
||||
Evas_Object_Smart_Clipped_Data *cso;
|
||||
Evas_Object *cso_clipper;
|
||||
|
||||
if (eo_isa(eo_obj, EVAS_SMART_CLIPPED_CLASS))
|
||||
cso = eo_data_scope_get(eo_obj, EVAS_SMART_CLIPPED_CLASS);
|
||||
else
|
||||
cso = evas_object_smart_data_get(eo_obj);
|
||||
cso_clipper = cso ? cso->clipper : NULL;
|
||||
|
||||
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||
evas_obj_no_render_set(obj2->object, hide);
|
||||
{
|
||||
if (cso_clipper != obj2->object)
|
||||
evas_obj_no_render_set(obj2->object, hide);
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -63,6 +63,7 @@ evas_object_smart_clipped_smart_add(Evas_Object *eo_obj)
|
|||
evas_object_resize(cso->clipper, 200000, 200000);
|
||||
evas_object_pass_events_set(cso->clipper, 1);
|
||||
evas_object_hide(cso->clipper); /* show when have something clipped to it */
|
||||
evas_obj_no_render_set(cso->clipper, 1);
|
||||
|
||||
evas_object_smart_data_set(eo_obj, cso);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue