forked from enlightenment/efl
Evas object text: Make the object size big enough to show the whole text.
I.e even if advance is smaller than width, take it into account. SVN revision: 71507
This commit is contained in:
parent
af55fb6217
commit
ef25a41a76
|
@ -768,5 +768,6 @@
|
||||||
|
|
||||||
2012-05-29 Tom Hacohen (TAsn)
|
2012-05-29 Tom Hacohen (TAsn)
|
||||||
|
|
||||||
|
* Text: Fixed an issue with text object sizing.
|
||||||
* Font: Fixed run-time italic.
|
* Font: Fixed run-time italic.
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,7 @@ static Evas_Coord
|
||||||
_evas_object_text_horiz_advance_get(const Evas_Object *obj,
|
_evas_object_text_horiz_advance_get(const Evas_Object *obj,
|
||||||
const Evas_Object_Text *o)
|
const Evas_Object_Text *o)
|
||||||
{
|
{
|
||||||
Evas_Object_Text_Item *it;
|
Evas_Object_Text_Item *it, *last_it = NULL;
|
||||||
Evas_Coord adv;
|
Evas_Coord adv;
|
||||||
(void) obj;
|
(void) obj;
|
||||||
|
|
||||||
|
@ -246,7 +246,11 @@ _evas_object_text_horiz_advance_get(const Evas_Object *obj,
|
||||||
EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
|
EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
|
||||||
{
|
{
|
||||||
adv += it->adv;
|
adv += it->adv;
|
||||||
|
last_it = it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (last_it && (last_it->w > last_it->adv))
|
||||||
|
adv += last_it->w - last_it->adv;
|
||||||
return adv;
|
return adv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue