edje: check font change in edje text part cache infra.

@fix
This commit is contained in:
Cedric BAIL 2014-03-17 19:10:22 +09:00
parent 8331f6e79f
commit 2b84495168
2 changed files with 5 additions and 2 deletions

View File

@ -1544,9 +1544,10 @@ struct _Edje_Real_Part_Text
Evas_Coord in_w, in_h; // 8
const char *in_str; // 4
const char *out_str; // 4
const char *in_font; // 4
FLOAT_T align_x, align_y; // 16
} cache;
}; // 84
}; // 88
// FIXME make text a potiner to struct and alloc at end
// if part type is TEXT move common members textblock +
// text to front and have smaller struct for textblock

View File

@ -266,7 +266,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
(ep->typedata.text->cache.align_y == params->type.text.align.y) &&
(ep->typedata.text->cache.elipsis == params->type.text.elipsis) &&
(ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
(ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y))
(ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
(ep->typedata.text->cache.in_font == font))
{
text = ep->typedata.text->cache.out_str;
size = ep->typedata.text->cache.out_size;
@ -414,6 +415,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
ep->typedata.text->cache.in_w = sw;
ep->typedata.text->cache.in_h = sh;
ep->typedata.text->cache.in_font = font;
ep->typedata.text->cache.out_size = size;
ep->typedata.text->cache.align_x = params->type.text.align.x;
ep->typedata.text->cache.align_y = params->type.text.align.y;