forked from enlightenment/efl
color class blocks in edje.
this allows you to specify the default color for any parts using color_classes in a given file. this color will be overridden by edje_color_class_set() which will in turn be overridden by edje_object_color_class_set() note. if you specify a color (color: ...) in a part description that also has a color_class, the cc will be multiplied against the color -- generally not what you want. also, as a tip, the gimp's 'multiply' blend mode is almost exactly the same as evas/edje's coloring. example: ... part { name: "colored"; type: RECT; description { state: "default" 0.0; color_class: "bg_color"; /* note: no color: set here */ } } ... color_classes { color_class { name: "bg_color"; color: 229 239 255 255; } } SVN revision: 19708
This commit is contained in:
parent
0b56671b3e
commit
702c78bb82
|
@ -312,6 +312,7 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
if ((evas_object_clipees_get(ed->clipper)) &&
|
if ((evas_object_clipees_get(ed->clipper)) &&
|
||||||
(evas_object_visible_get(obj)))
|
(evas_object_visible_get(obj)))
|
||||||
evas_object_show(ed->clipper);
|
evas_object_show(ed->clipper);
|
||||||
|
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
_edje_thaw(ed);
|
_edje_thaw(ed);
|
||||||
_edje_unblock(ed);
|
_edje_unblock(ed);
|
||||||
|
@ -467,6 +468,7 @@ _edje_file_add(Edje *ed)
|
||||||
ed->file = _edje_cache_file_coll_open(ed->path, ed->part,
|
ed->file = _edje_cache_file_coll_open(ed->path, ed->part,
|
||||||
&(ed->load_error),
|
&(ed->load_error),
|
||||||
&(ed->collection));
|
&(ed->collection));
|
||||||
|
|
||||||
if (!ed->collection)
|
if (!ed->collection)
|
||||||
{
|
{
|
||||||
if (ed->file)
|
if (ed->file)
|
||||||
|
@ -638,19 +640,27 @@ _edje_file_free(Edje_File *edf)
|
||||||
}
|
}
|
||||||
free(edf->collection_dir);
|
free(edf->collection_dir);
|
||||||
}
|
}
|
||||||
if (edf->data)
|
while (edf->data)
|
||||||
{
|
{
|
||||||
while (edf->data)
|
Edje_Data *edt;
|
||||||
{
|
|
||||||
Edje_Data *edt;
|
|
||||||
|
|
||||||
edt = edf->data->data;
|
edt = edf->data->data;
|
||||||
edf->data = evas_list_remove(edf->data, edt);
|
edf->data = evas_list_remove(edf->data, edt);
|
||||||
if (edt->key) evas_stringshare_del(edt->key);
|
if (edt->key) evas_stringshare_del(edt->key);
|
||||||
if (edt->value) evas_stringshare_del(edt->value);
|
if (edt->value) evas_stringshare_del(edt->value);
|
||||||
free(edt);
|
free(edt);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while(edf->color_classes)
|
||||||
|
{
|
||||||
|
Edje_Color_Class *ecc;
|
||||||
|
|
||||||
|
ecc = edf->color_classes->data;
|
||||||
|
edf->color_classes = evas_list_remove(edf->color_classes, ecc);
|
||||||
|
if (ecc->name) evas_stringshare_del(ecc->name);
|
||||||
|
free(ecc);
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: free collection_hash and collection_cache */
|
/* FIXME: free collection_hash and collection_cache */
|
||||||
if (edf->collection_hash)
|
if (edf->collection_hash)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue