summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-01-15 11:50:22 +0000
committerTom Hacohen <tom@stosb.com>2013-01-15 11:50:22 +0000
commitc089f174ca615a920ec2245d01eeacb209354d98 (patch)
tree510b5c3c3a764708340394d6ea1adddfdaa83243
parente183866d2114364ab81123113a408bece06d13df (diff)
Evas obj text: Fix an issue with horiz_advance_get func.
SVN revision: 82800
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/lib/evas/canvas/evas_object_text.c5
3 files changed, 3 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bf20184112..dcbafe9fff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
12013-01-15 Tom Hacohen (TAsn) 12013-01-15 Tom Hacohen (TAsn)
2 2
3 * Evas textblock: Fixed issue and simplified cursor_geometry_get. 3 * Evas textblock: Fixed issue and simplified cursor_geometry_get.
4 * Evas text: Fixed issue with horiz advance.
4 5
52013-01-14 Daniel Willmann 62013-01-14 Daniel Willmann
6 7
diff --git a/NEWS b/NEWS
index ef11b2160b..5e941372bb 100644
--- a/NEWS
+++ b/NEWS
@@ -114,3 +114,4 @@ Fixes:
114 * Evas textblock: Fixed issue with line height when breaking on a format. 114 * Evas textblock: Fixed issue with line height when breaking on a format.
115 * Fix SIGFPE in evas map update if image is 0. 115 * Fix SIGFPE in evas map update if image is 0.
116 * Evas textblock: Fixed issue and simplified cursor_geometry_get. 116 * Evas textblock: Fixed issue and simplified cursor_geometry_get.
117 * Evas text: Fixed issue with horiz advance.
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 3bc185a2da..8ad304e707 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -306,7 +306,7 @@ static Evas_Coord
306_evas_object_text_horiz_advance_get(const Evas_Object *eo_obj, 306_evas_object_text_horiz_advance_get(const Evas_Object *eo_obj,
307 const Evas_Object_Text *o) 307 const Evas_Object_Text *o)
308{ 308{
309 Evas_Object_Text_Item *it, *last_it = NULL; 309 Evas_Object_Text_Item *it;
310 Evas_Coord adv; 310 Evas_Coord adv;
311 (void) eo_obj; 311 (void) eo_obj;
312 312
@@ -314,11 +314,8 @@ _evas_object_text_horiz_advance_get(const Evas_Object *eo_obj,
314 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) 314 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
315 { 315 {
316 adv += it->adv; 316 adv += it->adv;
317 last_it = it;
318 } 317 }
319 318
320 if (last_it && (last_it->w > last_it->adv))
321 adv += last_it->w - last_it->adv;
322 return adv; 319 return adv;
323} 320}
324 321