forked from enlightenment/efl
evas: fix Evas_Object_Text alignment with ellipsis.
This commit is contained in:
parent
4606c0b95e
commit
3b93896e54
|
@ -2475,19 +2475,29 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
|
||||||
|
|
||||||
if ((o->font) && (o->items))
|
if ((o->font) && (o->items))
|
||||||
{
|
{
|
||||||
int w, h;
|
int h;
|
||||||
int l = 0, r = 0, t = 0, b = 0;
|
int l = 0, r = 0, t = 0, b = 0;
|
||||||
|
|
||||||
w = _evas_object_text_horiz_advance_get(eo_obj, o);
|
|
||||||
h = _evas_object_text_vert_advance_get(eo_obj, o);
|
h = _evas_object_text_vert_advance_get(eo_obj, o);
|
||||||
evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
|
evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
|
||||||
|
|
||||||
if (o->cur.ellipsis >= 0.0)
|
if (o->cur.ellipsis >= 0.0)
|
||||||
eo_do_super(eo_obj, MY_CLASS,
|
{
|
||||||
evas_obj_size_set(obj->cur->geometry.w, h + t + b));
|
int min;
|
||||||
|
|
||||||
|
min = o->last_computed.advance < obj->cur->geometry.w ? o->last_computed.advance : obj->cur->geometry.w;
|
||||||
|
eo_do_super(eo_obj, MY_CLASS,
|
||||||
|
evas_obj_size_set(min, h + t + b));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
eo_do_super(eo_obj, MY_CLASS,
|
{
|
||||||
evas_obj_size_set(w + l + r, h + t + b));
|
int w;
|
||||||
|
|
||||||
|
w = _evas_object_text_horiz_advance_get(eo_obj, o);
|
||||||
|
|
||||||
|
eo_do_super(eo_obj, MY_CLASS,
|
||||||
|
evas_obj_size_set(w + l + r, h + t + b));
|
||||||
|
}
|
||||||
//// obj->cur->cache.geometry.validity = 0;
|
//// obj->cur->cache.geometry.validity = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue