summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-09-20 17:59:44 +0100
committerTom Hacohen <tom@stosb.com>2013-09-23 14:37:18 +0100
commit2ab088aeea4a306899f442a2aba8fcea63c951dc (patch)
tree69b825c6ccbc87eca1504c89833eaf701c0918d0
parent2173652b4d0144b6172b74537ad3ad799a1d5468 (diff)
Evas textblock: Fixed native size calculation.
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 376647aa75..13944fafde 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10355,8 +10355,16 @@ _size_native_calc_line_finalize(const Evas_Object *eo_obj, Eina_List *items,
10355 } 10355 }
10356 else 10356 else
10357 { 10357 {
10358 Evas_Coord maxasc = 0, maxdesc = 0;
10358 _layout_item_ascent_descent_adjust(eo_obj, ascent, descent, 10359 _layout_item_ascent_descent_adjust(eo_obj, ascent, descent,
10359 it, it->format); 10360 it, it->format);
10361 _layout_item_max_ascent_descent_calc(eo_obj, &maxasc, &maxdesc,
10362 it, position);
10363
10364 if (maxasc > *ascent)
10365 *ascent = maxasc;
10366 if (maxdesc > *descent)
10367 *descent = maxdesc;
10360 } 10368 }
10361 10369
10362loop_advance: 10370loop_advance:
@@ -10420,10 +10428,16 @@ _size_native_calc_paragraph_size(const Evas_Object *eo_obj,
10420 } 10428 }
10421 } 10429 }
10422 10430
10423 *position = (*position == TEXTBLOCK_POSITION_START) ? 10431 if (!EINA_INLIST_GET(par)->next)
10424 TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END; 10432 {
10433 *position = (*position == TEXTBLOCK_POSITION_START) ?
10434 TEXTBLOCK_POSITION_SINGLE : TEXTBLOCK_POSITION_END;
10435 }
10425 _size_native_calc_line_finalize(eo_obj, line_items, &ascent, &descent, &w, *position); 10436 _size_native_calc_line_finalize(eo_obj, line_items, &ascent, &descent, &w, *position);
10426 10437
10438 if (*position == TEXTBLOCK_POSITION_START)
10439 *position = TEXTBLOCK_POSITION_ELSE;
10440
10427 line_items = eina_list_free(line_items); 10441 line_items = eina_list_free(line_items);
10428 10442
10429 /* Do the last addition */ 10443 /* Do the last addition */