summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2011-06-12 14:12:52 +0000
committerTom Hacohen <tom@stosb.com>2011-06-12 14:12:52 +0000
commit4489f92cf361a53fc8a92c2ab475f579fcaf073c (patch)
tree9746be6d92cd006a3321ec9b48c9d4ecc0f57761
parent343a17c08cde2a8ad79e5c6a965207fb6424e7b1 (diff)
Edje text: Fix a rare issue causing ellipsis not to work.
SVN revision: 60240
-rw-r--r--legacy/edje/ChangeLog4
-rw-r--r--legacy/edje/src/lib/edje_text.c11
2 files changed, 12 insertions, 3 deletions
diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog
index 9ec78560d2..671c09ffb0 100644
--- a/legacy/edje/ChangeLog
+++ b/legacy/edje/ChangeLog
@@ -119,3 +119,7 @@
119 119
120 * Fix external usage in sub group to have the proper parents. 120 * Fix external usage in sub group to have the proper parents.
121 121
1222011-06-11 Tom Hacohen (TAsn)
123
124 * Fix an issue with ellipsis not working properly with small
125 text parts.
diff --git a/legacy/edje/src/lib/edje_text.c b/legacy/edje/src/lib/edje_text.c
index c29cbe7a8f..a2038d057a 100644
--- a/legacy/edje/src/lib/edje_text.c
+++ b/legacy/edje/src/lib/edje_text.c
@@ -148,9 +148,14 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
148 uc1 = evas_object_text_last_up_to_pos(ep->object, 148 uc1 = evas_object_text_last_up_to_pos(ep->object,
149 -p + l, th / 2); 149 -p + l, th / 2);
150 if (params->type.text.elipsis != 1.0) 150 if (params->type.text.elipsis != 1.0)
151 /* should be the last in text! not the rightmost */ 151 {
152 uc2 = evas_object_text_last_up_to_pos(ep->object, 152 /* should be the last in text! not the rightmost */
153 -p + sw - r, th / 2); 153 if ((-p + sw -r) < 0)
154 uc2 = evas_object_text_last_up_to_pos(ep->object, 0, th / 2);
155 else
156 uc2 = evas_object_text_last_up_to_pos(ep->object,
157 -p + sw - r, th / 2);
158 }
154 if ((uc1 < 0) && (uc2 < 0)) 159 if ((uc1 < 0) && (uc2 < 0))
155 { 160 {
156 uc1 = 0; 161 uc1 = 0;