evas - textblock ... fix valign handling to actually work as documented

valign handling was really broken. this fixes it to pretty much work
again. ie 0.0 == top, 0.5 == centered, 1.0 == bottom align and -1.0
== baseline. only baseline worked before.
This commit is contained in:
Carsten Haitzler 2014-02-08 22:54:56 +09:00
parent 28ee00c8c3
commit 229ee74f6c
1 changed files with 9 additions and 1 deletions

View File

@ -10743,7 +10743,15 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
yoff = ln->baseline; \
if (itr->format->valign != -1.0) \
{ \
yoff += itr->format->valign * (ln->h - itr->h); \
if (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) \
{ \
Evas_Object_Textblock_Text_Item *titr = \
(Evas_Object_Textblock_Text_Item *)itr; \
yoff = \
evas_common_font_instance_max_ascent_get(titr->text_props.font_instance) +\
(itr->format->valign * (ln->h - itr->h)); \
} \
else yoff = itr->format->valign * (ln->h - itr->h); \
} \
itr->yoff = yoff; \
if (clip) \