diff options
author | WooHyun Jung <wh0705.jung@samsung.com> | 2012-07-26 17:49:08 +0900 |
---|---|---|
committer | WooHyun Jung <wh0705.jung@samsung.com> | 2012-07-26 17:49:08 +0900 |
commit | 4f7bbc6b68a74eb3130222a087a3f031838d0701 (patch) | |
tree | 9339a4ccc8d8f2ee6970ecda2368f8508b03db09 | |
parent | 0d94471f81cd84ae1698db1c8a13c9cf7897adbf (diff) | |
download | edje-4f7bbc6b68a74eb3130222a087a3f031838d0701.tar.gz edje-4f7bbc6b68a74eb3130222a087a3f031838d0701.tar.bz2 edje-4f7bbc6b68a74eb3130222a087a3f031838d0701.zip |
Edje textblock: Fixed bug with applying text class size.
Happens when text size is updated, but font is not.
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@73600 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
Conflicts:
ChangeLog
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/edje_textblock_styles.c | 19 |
2 files changed, 15 insertions, 9 deletions
@@ -416,3 +416,8 @@ * Fix patch for edje draggable jump issue when external event area is used for the dragable. + +2012-07-12 Tom Hacohen (TAsn) + + * Textblock: Fixed issue with updating only the font size using text + classes. diff --git a/src/lib/edje_textblock_styles.c b/src/lib/edje_textblock_styles.c index 13a68ad..bf7f330 100644 --- a/src/lib/edje_textblock_styles.c +++ b/src/lib/edje_textblock_styles.c @@ -176,7 +176,13 @@ _edje_textblock_style_all_update(Edje *ed) /* Make sure the style contains a text_class */ EINA_LIST_FOREACH(stl->tags, ll, tag) - if (tag->text_class) found = 1; + { + if (tag->text_class) + { + found = 1; + break; + } + } /* No text classes , goto next style */ if (!found) continue; @@ -198,11 +204,7 @@ _edje_textblock_style_all_update(Edje *ed) eina_strbuf_append(txt, "='"); /* Configure fonts from text class if it exists */ - if ((tc = _edje_text_class_find(ed, tag->text_class))) - { - /* Only update if not clearing, If clear leave it at zero */ - if (tc->font) found = 1; - } + tc = _edje_text_class_find(ed, tag->text_class); /* Add and Ha`ndle tag parsed data */ eina_strbuf_append(txt, tag->value); @@ -223,7 +225,7 @@ _edje_textblock_style_all_update(Edje *ed) { char font_size[32]; - if (found) + if (tc && tc->size) snprintf(font_size, sizeof(font_size), "%f", (double) _edje_text_size_calc(tag->font_size, tc)); else snprintf(font_size, sizeof(font_size), "%f", tag->font_size); @@ -240,10 +242,9 @@ _edje_textblock_style_all_update(Edje *ed) eina_strbuf_append(txt, " "); eina_strbuf_append(txt, "font="); - f = (found) ? tc->font : tag->font; + f = (tc && tc->font) ? tc->font : tag->font; eina_strbuf_append_escaped(txt, f); } - found = 0; eina_strbuf_append(txt, "'"); } |