summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli <ali198724@gmail.com>2020-05-06 20:30:14 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2020-05-06 20:30:15 +0900
commit4447e10b6337c72a0734cc9831055adff3dcc9af (patch)
treea09c576405244677891748220a72a885cc44914a
parent4976097bd427c09b493e428ce476b83d6427199e (diff)
edje_textblock: optimize priority handling for content_fit options
Summary: this patch will reduce amount of unnessesary calculations, if user set both font_size_array and size_range for content fit. Reviewers: woohyun, bowonryu Reviewed By: woohyun Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11498
-rw-r--r--src/lib/edje/edje_textblock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/edje/edje_textblock.c b/src/lib/edje/edje_textblock.c
index fe3ec439fb..5711c7040f 100644
--- a/src/lib/edje/edje_textblock.c
+++ b/src/lib/edje/edje_textblock.c
@@ -558,12 +558,14 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
558 mode |= TEXTBLOCK_FIT_MODE_HEIGHT; 558 mode |= TEXTBLOCK_FIT_MODE_HEIGHT;
559 evas_textblock_fit_options_set(ep->object, mode); 559 evas_textblock_fit_options_set(ep->object, mode);
560 evas_textblock_fit_step_size_set(ep->object, chosen_desc->text.fit_step); 560 evas_textblock_fit_step_size_set(ep->object, chosen_desc->text.fit_step);
561 if ( chosen_desc->text.size_range_min || chosen_desc->text.size_range_max) 561 if (size_array_len > 0)
562 evas_textblock_fit_size_range_set(ep->object, chosen_desc->text.size_range_min, chosen_desc->text.size_range_max);
563 if (size_array_len>0)
564 { 562 {
565 evas_textblock_fit_size_array_set(ep->object,size_array,size_array_len); 563 evas_textblock_fit_size_array_set(ep->object,size_array,size_array_len);
566 } 564 }
565 else if ( chosen_desc->text.size_range_min || chosen_desc->text.size_range_max)
566 {
567 evas_textblock_fit_size_range_set(ep->object, chosen_desc->text.size_range_min, chosen_desc->text.size_range_max);
568 }
567 } 569 }
568 570
569 if ((ed->file->efl_version.major >= 1) && (ed->file->efl_version.minor >= 19)) 571 if ((ed->file->efl_version.major >= 1) && (ed->file->efl_version.minor >= 19))