forked from enlightenment/efl
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:
parent
28ee00c8c3
commit
229ee74f6c
|
@ -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) \
|
||||
|
|
Loading…
Reference in New Issue