summaryrefslogtreecommitdiff
path: root/legacy/edje
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/edje')
-rw-r--r--legacy/edje/ChangeLog6
-rw-r--r--legacy/edje/src/lib/edje_textblock_styles.c19
2 files changed, 16 insertions, 9 deletions
diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog
index 07c9f110d1..0df1b2225d 100644
--- a/legacy/edje/ChangeLog
+++ b/legacy/edje/ChangeLog
@@ -513,3 +513,9 @@
5132012-07-03 Tom Hacohen (TAsn) 5132012-07-03 Tom Hacohen (TAsn)
514 514
515 * Entry: Update anchors from user_insert as well. 515 * Entry: Update anchors from user_insert as well.
516
5172012-07-12 Tom Hacohen (TAsn)
518
519 * Textblock: Fixed issue with updating only the font size using text
520 classes.
521
diff --git a/legacy/edje/src/lib/edje_textblock_styles.c b/legacy/edje/src/lib/edje_textblock_styles.c
index 13a68ada91..bf7f330ffe 100644
--- a/legacy/edje/src/lib/edje_textblock_styles.c
+++ b/legacy/edje/src/lib/edje_textblock_styles.c
@@ -176,7 +176,13 @@ _edje_textblock_style_all_update(Edje *ed)
176 176
177 /* Make sure the style contains a text_class */ 177 /* Make sure the style contains a text_class */
178 EINA_LIST_FOREACH(stl->tags, ll, tag) 178 EINA_LIST_FOREACH(stl->tags, ll, tag)
179 if (tag->text_class) found = 1; 179 {
180 if (tag->text_class)
181 {
182 found = 1;
183 break;
184 }
185 }
180 186
181 /* No text classes , goto next style */ 187 /* No text classes , goto next style */
182 if (!found) continue; 188 if (!found) continue;
@@ -198,11 +204,7 @@ _edje_textblock_style_all_update(Edje *ed)
198 eina_strbuf_append(txt, "='"); 204 eina_strbuf_append(txt, "='");
199 205
200 /* Configure fonts from text class if it exists */ 206 /* Configure fonts from text class if it exists */
201 if ((tc = _edje_text_class_find(ed, tag->text_class))) 207 tc = _edje_text_class_find(ed, tag->text_class);
202 {
203 /* Only update if not clearing, If clear leave it at zero */
204 if (tc->font) found = 1;
205 }
206 208
207 /* Add and Ha`ndle tag parsed data */ 209 /* Add and Ha`ndle tag parsed data */
208 eina_strbuf_append(txt, tag->value); 210 eina_strbuf_append(txt, tag->value);
@@ -223,7 +225,7 @@ _edje_textblock_style_all_update(Edje *ed)
223 { 225 {
224 char font_size[32]; 226 char font_size[32];
225 227
226 if (found) 228 if (tc && tc->size)
227 snprintf(font_size, sizeof(font_size), "%f", (double) _edje_text_size_calc(tag->font_size, tc)); 229 snprintf(font_size, sizeof(font_size), "%f", (double) _edje_text_size_calc(tag->font_size, tc));
228 else 230 else
229 snprintf(font_size, sizeof(font_size), "%f", tag->font_size); 231 snprintf(font_size, sizeof(font_size), "%f", tag->font_size);
@@ -240,10 +242,9 @@ _edje_textblock_style_all_update(Edje *ed)
240 eina_strbuf_append(txt, " "); 242 eina_strbuf_append(txt, " ");
241 eina_strbuf_append(txt, "font="); 243 eina_strbuf_append(txt, "font=");
242 244
243 f = (found) ? tc->font : tag->font; 245 f = (tc && tc->font) ? tc->font : tag->font;
244 eina_strbuf_append_escaped(txt, f); 246 eina_strbuf_append_escaped(txt, f);
245 } 247 }
246 found = 0;
247 248
248 eina_strbuf_append(txt, "'"); 249 eina_strbuf_append(txt, "'");
249 } 250 }