summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-10-02 11:02:05 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-10-02 11:02:05 +0900
commit3b93896e54d82b451919484100d0cb830e759536 (patch)
tree075cf192f9aee44264a737ccdbd6810e27962b46 /src
parent4606c0b95eff35c1a03b8d7fdff41a3320bccb0a (diff)
evas: fix Evas_Object_Text alignment with ellipsis.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_text.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 29057d2468..7e9a081c36 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2475,19 +2475,29 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
2475 2475
2476 if ((o->font) && (o->items)) 2476 if ((o->font) && (o->items))
2477 { 2477 {
2478 int w, h; 2478 int h;
2479 int l = 0, r = 0, t = 0, b = 0; 2479 int l = 0, r = 0, t = 0, b = 0;
2480 2480
2481 w = _evas_object_text_horiz_advance_get(eo_obj, o);
2482 h = _evas_object_text_vert_advance_get(eo_obj, o); 2481 h = _evas_object_text_vert_advance_get(eo_obj, o);
2483 evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); 2482 evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
2484 2483
2485 if (o->cur.ellipsis >= 0.0) 2484 if (o->cur.ellipsis >= 0.0)
2486 eo_do_super(eo_obj, MY_CLASS, 2485 {
2487 evas_obj_size_set(obj->cur->geometry.w, h + t + b)); 2486 int min;
2487
2488 min = o->last_computed.advance < obj->cur->geometry.w ? o->last_computed.advance : obj->cur->geometry.w;
2489 eo_do_super(eo_obj, MY_CLASS,
2490 evas_obj_size_set(min, h + t + b));
2491 }
2488 else 2492 else
2489 eo_do_super(eo_obj, MY_CLASS, 2493 {
2490 evas_obj_size_set(w + l + r, h + t + b)); 2494 int w;
2495
2496 w = _evas_object_text_horiz_advance_get(eo_obj, o);
2497
2498 eo_do_super(eo_obj, MY_CLASS,
2499 evas_obj_size_set(w + l + r, h + t + b));
2500 }
2491//// obj->cur->cache.geometry.validity = 0; 2501//// obj->cur->cache.geometry.validity = 0;
2492 } 2502 }
2493 else 2503 else