summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-05-06 20:33:42 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2020-05-06 20:33:42 +0900
commit287ec502032d499085229b820cab053e7df28a01 (patch)
tree3c3aef75aab55fa3ee402335b51f45f869e5260e
parent4447e10b6337c72a0734cc9831055adff3dcc9af (diff)
edje_textblock: content_fit size_range update
Summary: update size range will skip empty font_sizes Reviewers: woohyun, bowonryu Reviewed By: woohyun Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11507
-rw-r--r--src/lib/edje/edje_textblock.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/edje/edje_textblock.c b/src/lib/edje/edje_textblock.c
index 5711c7040f..38b737a508 100644
--- a/src/lib/edje/edje_textblock.c
+++ b/src/lib/edje/edje_textblock.c
@@ -539,12 +539,15 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
539 Evas_Textblock_Style *st = _edje_textblock_style_get(ed, chosen_desc->text.style.str); 539 Evas_Textblock_Style *st = _edje_textblock_style_get(ed, chosen_desc->text.style.str);
540 const char *text_style = evas_textblock_style_get(st); 540 const char *text_style = evas_textblock_style_get(st);
541 char *s_font_size = (text_style) ? strrstr(text_style,"font_size=") : NULL; 541 char *s_font_size = (text_style) ? strrstr(text_style,"font_size=") : NULL;
542 if (s_font_size) 542 if (s_font_size && s_font_size[10])
543 { 543 {
544 int font_size = strtol(&s_font_size[10], NULL, 10); 544 int font_size = (int) strtol(&s_font_size[10], NULL, 10);
545 chosen_desc->text.size_range_max = font_size; 545 if (font_size > 0)
546 if (chosen_desc->text.size_range_min > chosen_desc->text.size_range_max) 546 {
547 chosen_desc->text.size_range_min = chosen_desc->text.size_range_max; 547 chosen_desc->text.size_range_max = font_size;
548 if (chosen_desc->text.size_range_min > chosen_desc->text.size_range_max)
549 chosen_desc->text.size_range_min = chosen_desc->text.size_range_max;
550 }
548 } 551 }
549 EINA_LIST_FOREACH(chosen_desc->text.fit_size_array, l, value) 552 EINA_LIST_FOREACH(chosen_desc->text.fit_size_array, l, value)
550 { 553 {