aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2017-11-06 11:29:43 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-06 11:29:43 +0900
commita386597ad92a1022ba41f94afdb28bdf9136d551 (patch)
treeccc6a2f33b40c5de147eb811565f9cd03c639bba /src/tests
parentgitignores - update for new pc files (diff)
downloadefl-a386597ad92a1022ba41f94afdb28bdf9136d551.tar.gz
evas textblock: handle ellipsis when text's height exceed its area by "br"
Summary: Textblock's ellipsis feature only worked when text's width exceeds its area. So, it didn't work when text's height exceeds its area by "br" tags. This patch will do ellipsis when only ellipsis=1.0 is set. @fix Test Plan: make check Reviewers: herdsman, raster, cedric, jpeg, sohyun Reviewed By: raster Subscribers: woohyun Differential Revision: https://phab.enlightenment.org/D5412
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/evas/evas_test_textblock.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index 153e2bbd73..6700bdc3e6 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2069,6 +2069,15 @@ START_TEST(evas_textblock_wrapping)
evas_object_textblock_size_formatted_get(tb, &w, &h);
ck_assert_int_le(w, (nw / 2));
+ /* Vertical ellipsis when text includes "br" tags */
+ evas_object_textblock_text_markup_set(tb, "AAAA<br/>BBBB<br/>CCCC<br/>DDDD<br/>EEEE<br/>FFFF<br/>");
+ evas_textblock_cursor_format_prepend(cur, "+ font_size=20 ellipsis=1.0");
+ evas_object_resize(tb, 500, 500);
+ evas_object_textblock_size_formatted_get(tb, &bw, &bh);
+ evas_object_resize(tb, bw * 10, bh / 2);
+ evas_object_textblock_size_formatted_get(tb, &w, &h);
+ ck_assert_int_le(h, (bh / 2));
+
evas_object_textblock_text_markup_set(tb, "<item absize=100x100 href=item1></item><item absize=100x100 href=item2></item>");
evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0");
evas_object_resize(tb, 101, 100);