forked from enlightenment/efl
Moved the text_class into the description's text section.
SVN revision: 7773
This commit is contained in:
parent
2042be6db7
commit
c5366158c7
|
@ -22,7 +22,6 @@ static void st_collections_group_parts_part_effect(void);
|
|||
static void st_collections_group_parts_part_mouse_events(void);
|
||||
static void st_collections_group_parts_part_repeat_events(void);
|
||||
static void st_collections_group_parts_part_clip_to_id(void);
|
||||
static void st_collections_group_parts_part_text_class(void);
|
||||
static void st_collections_group_parts_part_dragable_x(void);
|
||||
static void st_collections_group_parts_part_dragable_y(void);
|
||||
static void st_collections_group_parts_part_dragable_confine(void);
|
||||
|
@ -58,6 +57,7 @@ static void st_collections_group_parts_part_description_color(void);
|
|||
static void st_collections_group_parts_part_description_color2(void);
|
||||
static void st_collections_group_parts_part_description_color3(void);
|
||||
static void st_collections_group_parts_part_description_text_text(void);
|
||||
static void st_collections_group_parts_part_description_text_text_class(void);
|
||||
static void st_collections_group_parts_part_description_text_font(void);
|
||||
static void st_collections_group_parts_part_description_text_size(void);
|
||||
static void st_collections_group_parts_part_description_text_fit(void);
|
||||
|
@ -92,7 +92,6 @@ New_Statement_Handler statement_handlers[] =
|
|||
{"collections.group.parts.part.mouse_events", st_collections_group_parts_part_mouse_events},
|
||||
{"collections.group.parts.part.repeat_events", st_collections_group_parts_part_repeat_events},
|
||||
{"collections.group.parts.part.clip_to", st_collections_group_parts_part_clip_to_id},
|
||||
{"collections.group.parts.part.text_class", st_collections_group_parts_part_text_class},
|
||||
{"collections.group.parts.part.dragable.x", st_collections_group_parts_part_dragable_x},
|
||||
{"collections.group.parts.part.dragable.y", st_collections_group_parts_part_dragable_y},
|
||||
{"collections.group.parts.part.dragable.confine", st_collections_group_parts_part_dragable_confine},
|
||||
|
@ -126,6 +125,7 @@ New_Statement_Handler statement_handlers[] =
|
|||
{"collections.group.parts.part.description.color2", st_collections_group_parts_part_description_color2},
|
||||
{"collections.group.parts.part.description.color3", st_collections_group_parts_part_description_color3},
|
||||
{"collections.group.parts.part.description.text.text", st_collections_group_parts_part_description_text_text},
|
||||
{"collections.group.parts.part.description.text.text_class", st_collections_group_parts_part_description_text_text_class},
|
||||
{"collections.group.parts.part.description.text.font", st_collections_group_parts_part_description_text_font},
|
||||
{"collections.group.parts.part.description.text.size", st_collections_group_parts_part_description_text_size},
|
||||
{"collections.group.parts.part.description.text.fit", st_collections_group_parts_part_description_text_fit},
|
||||
|
@ -162,7 +162,6 @@ New_Object_Handler object_handlers[] =
|
|||
{"collections.group.parts.part.mouse_events", NULL},
|
||||
{"collections.group.parts.part.repeat_events", NULL},
|
||||
{"collections.group.parts.part.clip_to", NULL},
|
||||
{"collections.group.parts.part.text_class", NULL},
|
||||
{"collections.group.parts.part.dragable", NULL},
|
||||
{"collections.group.parts.part.dragable.x", NULL},
|
||||
{"collections.group.parts.part.dragable.y", NULL},
|
||||
|
@ -205,6 +204,7 @@ New_Object_Handler object_handlers[] =
|
|||
{"collections.group.parts.part.description.color3", NULL},
|
||||
{"collections.group.parts.part.description.text", NULL},
|
||||
{"collections.group.parts.part.description.text.text", NULL},
|
||||
{"collections.group.parts.part.description.text.text_class", NULL},
|
||||
{"collections.group.parts.part.description.text.font", NULL},
|
||||
{"collections.group.parts.part.description.text.size", NULL},
|
||||
{"collections.group.parts.part.description.text.fit", NULL},
|
||||
|
@ -451,17 +451,6 @@ st_collections_group_parts_part_clip_to_id(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
st_collections_group_parts_part_text_class(void)
|
||||
{
|
||||
Edje_Part_Collection *pc;
|
||||
Edje_Part *ep;
|
||||
|
||||
pc = evas_list_data(evas_list_last(edje_collections));
|
||||
ep = evas_list_data(evas_list_last(pc->parts));
|
||||
ep->text_class = parse_str(0);
|
||||
}
|
||||
|
||||
static void
|
||||
st_collections_group_parts_part_dragable_x(void)
|
||||
{
|
||||
|
@ -1064,6 +1053,20 @@ st_collections_group_parts_part_description_text_text(void)
|
|||
ed->text.text = parse_str(0);
|
||||
}
|
||||
|
||||
static void
|
||||
st_collections_group_parts_part_description_text_text_class(void)
|
||||
{
|
||||
Edje_Part_Collection *pc;
|
||||
Edje_Part *ep;
|
||||
Edje_Part_Description *ed;
|
||||
|
||||
pc = evas_list_data(evas_list_last(edje_collections));
|
||||
ep = evas_list_data(evas_list_last(pc->parts));
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
|
||||
ed->text.text_class = parse_str(0);
|
||||
}
|
||||
|
||||
static void
|
||||
st_collections_group_parts_part_description_text_font(void)
|
||||
{
|
||||
|
|
|
@ -413,11 +413,11 @@ _edje_part_recalc_single(Edje *ed,
|
|||
font = chosen_desc->text.font;
|
||||
size = chosen_desc->text.size;
|
||||
|
||||
if ((ep->part->text_class) && (strlen(ep->part->text_class) > 0))
|
||||
if ((chosen_desc->text.text_class) && (strlen(chosen_desc->text.text_class) > 0))
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
tc = _edje_text_class_find(ed, ep->part->text_class);
|
||||
tc = _edje_text_class_find(ed, chosen_desc->text.text_class);
|
||||
if (tc->font) font = tc->font;
|
||||
if (tc->size > 0) size = tc->size;
|
||||
}
|
||||
|
|
|
@ -155,6 +155,7 @@ _edje_edd_setup(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.b", color3.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.a", color3.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text", text.text, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text_class", text.text_class, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.font", text.font, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.size", text.size, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.fit_x", text.fit_x, EET_T_UCHAR);
|
||||
|
@ -173,7 +174,6 @@ _edje_edd_setup(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "effect", effect, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mouse_events", mouse_events, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "text_class", text_class, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_part, Edje_Part, "default_desc", default_desc, _edje_edd_edje_part_description);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part, Edje_Part, "other_desc", other_desc, _edje_edd_edje_part_description);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.x", dragable.x, EET_T_CHAR);
|
||||
|
|
|
@ -574,7 +574,6 @@ _edje_collection_free(Edje_Part_Collection *ec)
|
|||
ep = ec->parts->data;
|
||||
ec->parts = evas_list_remove(ec->parts, ep);
|
||||
if (ep->name) free(ep->name);
|
||||
if (ep->text_class) free(ep->text_class);
|
||||
if (ep->default_desc) _edje_collection_free_part_description_free(ep->default_desc);
|
||||
while (ep->other_desc)
|
||||
{
|
||||
|
@ -610,6 +609,7 @@ _edje_collection_free_part_description_free(Edje_Part_Description *desc)
|
|||
free(pi);
|
||||
}
|
||||
if (desc->text.text) free(desc->text.text);
|
||||
if (desc->text.text_class) free(desc->text.text_class);
|
||||
if (desc->text.font) free(desc->text.font);
|
||||
if (desc->color_class) free(desc->color_class);
|
||||
free(desc);
|
||||
|
|
|
@ -235,7 +235,6 @@ struct _Edje_Part
|
|||
unsigned char mouse_events; /* it will affect/respond to mouse events */
|
||||
unsigned char repeat_events; /* it will repeat events to objects below */
|
||||
int clip_to_id; /* the part id to clip this one to */
|
||||
char *text_class; /* how to apply/modify the font */
|
||||
Edje_Part_Description *default_desc; /* the part descriptor for default */
|
||||
Evas_List *other_desc; /* other possible descriptors */
|
||||
struct {
|
||||
|
@ -321,6 +320,7 @@ struct _Edje_Part_Description
|
|||
|
||||
struct {
|
||||
char *text; /* if "" or NULL, then leave text unchanged */
|
||||
char *text_class; /* how to apply/modify the font */
|
||||
char *font; /* if a specific font is asked for */
|
||||
|
||||
int size; /* 0 = use user set size */
|
||||
|
|
|
@ -245,11 +245,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
font = chosen_desc->text.font;
|
||||
size = chosen_desc->text.size;
|
||||
|
||||
if ((ep->part->text_class) && (strlen(ep->part->text_class) > 0))
|
||||
if ((chosen_desc->text.text_class) && (strlen(chosen_desc->text.text_class) > 0))
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
tc = _edje_text_class_find(ed, ep->part->text_class);
|
||||
tc = _edje_text_class_find(ed, chosen_desc->text.text_class);
|
||||
if (tc->font) font = tc->font;
|
||||
if (tc->size > 0) size = tc->size;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue