in theory.. support middle solid/default/none changes in evas

SVN revision: 39001
This commit is contained in:
Carsten Haitzler 2009-02-12 13:39:15 +00:00
parent cb94c8fadd
commit c1af94ee4c
3 changed files with 31 additions and 12 deletions

View File

@ -3689,7 +3689,7 @@ st_collections_group_parts_part_description_rel2_to_y(void)
..
tween: "filenameN.ext";
border: left right top bottom;
middle: 0-1;
middle: 0/1/NONE/DEFAULT/SOLID;
}
..
}
@ -3828,11 +3828,11 @@ st_collections_group_parts_part_description_image_border(void)
@property
middle
@parameters
[0 or 1]
0, 1, NONE, DEFAULT, SOLID
@effect
If border is set, this boolean value tells Edje if the rest of the
image (not covered by the defined border) will be displayed or not.
The default value is 1.
If border is set, this value tells Edje if the rest of the
image (not covered by the defined border) will be displayed or not
or be assumed to be solid (without alpha). The default is 1/DEFAULT.
@endproperty
*/
static void
@ -3857,7 +3857,13 @@ st_collections_group_parts_part_description_image_middle(void)
ed = ep->default_desc;
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
ed->border.no_fill = !parse_bool(0);
ed->border.no_fill = parse_enum(0,
"1", 0,
"DEFAULT", 0,
"0", 1,
"NONE", 1,
"SOLID", 2,
NULL);
}
/**

View File

@ -1258,8 +1258,12 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
evas_object_image_border_set(ep->object, p3->border.l, p3->border.r,
p3->border.t, p3->border.b);
evas_object_image_border_center_fill_set(ep->object,
!(chosen_desc->border.no_fill));
if (chosen_desc->border.no_fill == 0)
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_DEFAULT);
else if (chosen_desc->border.no_fill == 1)
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_NONE);
else if (chosen_desc->border.no_fill == 2)
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_SOLID);
image_id = ep->param1.description->image.id;
if (image_id < 0)
{

View File

@ -3640,14 +3640,19 @@ EAPI unsigned char
edje_edit_state_image_border_fill_get(Evas_Object *obj, const char *part, const char *state)
{
GET_PD_OR_RETURN(0);
return pd->border.no_fill ? 0 : 1;
if (pd->border.no_fill == 0) return 1;
else if (pd->border.no_fill == 1) return 0;
else if (pd->border.no_fill == 2) return 2;
return 0;
}
EAPI void
edje_edit_state_image_border_fill_set(Evas_Object *obj, const char *part, const char *state, unsigned char fill)
{
GET_PD_OR_RETURN();
pd->border.no_fill = fill ? 0 : 1;
if (fill == 0) pd->border.no_fill = 1;
else if (fill == 1) pd->border.no_fill = 0;
else if (fill == 2) pd->border.no_fill = 2;
edje_object_calc_force(obj);
}
@ -5068,8 +5073,12 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s
if (pd->border.l || pd->border.r || pd->border.t || pd->border.b)
fprintf(f, I6"border: %d %d %d %d;\n", pd->border.l, pd->border.r, pd->border.t, pd->border.b);
if (pd->border.no_fill)
fprintf(f, I6"middle: 0;\n");
if (pd->border.no_fill == 1)
fprintf(f, I6"middle: NONE;\n");
else if (pd->border.no_fill == 0)
fprintf(f, I6"middle: DEFAULT;\n");
else if (pd->border.no_fill == 2)
fprintf(f, I6"middle: SOLID;\n");
fprintf(f, I5"}\n");//image
}