aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-03-17 19:10:22 +0900
committerCedric BAIL <cedric.bail@samsung.com>2014-03-17 19:17:23 +0900
commit5da08f61c943d17d893f5da1b624355caa34893d (patch)
tree154c41bdcadb6a2d15e6b4278ea1bb7875dbe0da
parentedje/entry: fix to not emit "changed" signal in unnecessary cases of password... (diff)
downloadefl-5da08f61c943d17d893f5da1b624355caa34893d.tar.gz
edje: check font change in edje text part cache infra.
@fix
-rw-r--r--src/lib/edje/edje_private.h3
-rw-r--r--src/lib/edje/edje_text.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 0ca1ca7c04..66a53568fe 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1537,9 +1537,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;
-}; // 76
+}; // 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
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 3f68519987..9f5536d931 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -256,7 +256,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;
@@ -404,6 +405,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;