bizarre - text sources were broken - but never appeared in e - somehow they

worked. fixed.


SVN revision: 32078
This commit is contained in:
Carsten Haitzler 2007-10-14 23:54:27 +00:00
parent 8108d0e8d6
commit 412d44f90f
2 changed files with 18 additions and 2 deletions

View File

@ -728,6 +728,7 @@ _edje_part_recalc_single(Edje *ed,
{
if (ep->text.text) text = ep->text.text;
}
if (ep->text.source)
{
if (ep->text.source->text.font) font = ep->text.source->text.font;
@ -1182,6 +1183,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
if (ep->param2.rel2_to_y) _edje_part_recalc(ed, ep->param2.rel2_to_y, FLAG_Y);
}
if (ep->confine_to) _edje_part_recalc(ed, ep->confine_to, flags);
// if (ep->text.source) _edje_part_recalc(ed, ep->text.source, flags);
// if (ep->text.text_source) _edje_part_recalc(ed, ep->text.text_source, flags);
/* actually calculate now */
chosen_desc = ep->chosen_description;

View File

@ -341,13 +341,26 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
if (ep->text.font) font = ep->text.font;
if (ep->text.size > 0) size = ep->text.size;
if (ep->text.text_source)
{
text = ep->text.text_source->chosen_description->text.text;
if (ep->text.text_source->text.text) text = ep->text.text_source->text.text;
}
if (ep->text.source)
{
font = ep->text.source->chosen_description->text.font;
size = ep->text.source->chosen_description->text.size;
if (ep->text.source->text.font) font = ep->text.source->text.font;
if (ep->text.source->text.size > 0) size = ep->text.source->text.size;
}
if (!text) text = "";
if (!font) font = "";
/* check if the font is embedded in the .eet */
if (ed->file->font_hash)
{
Edje_Font_Directory_Entry *fnt = evas_hash_find (ed->file->font_hash, font);
Edje_Font_Directory_Entry *fnt = evas_hash_find(ed->file->font_hash, font);
if (fnt)
{
@ -386,7 +399,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
(ep->text.cache.fit_x == chosen_desc->text.fit_x) &&
(ep->text.cache.fit_y == chosen_desc->text.fit_y))
{
text = (char *) ep->text.cache.out_str;
text = (char *)ep->text.cache.out_str;
size = ep->text.cache.out_size;
if (!text) text = "";