ellipsis re-format on height change too if an ellipsis is set anywhere

SVN revision: 58200
This commit is contained in:
Carsten Haitzler 2011-03-30 10:38:02 +00:00
parent 12d1b2d24d
commit c404d42a22
1 changed files with 13 additions and 2 deletions

View File

@ -435,6 +435,7 @@ struct _Evas_Object_Textblock
unsigned char redraw : 1;
unsigned char changed : 1;
unsigned char content_changed : 1;
unsigned char have_ellipsis : 1;
Eina_Bool newline_is_ps : 1;
};
@ -1579,6 +1580,13 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char
fmt->ellipsis = strtod(tmp_param, &endptr);
if ((fmt->ellipsis < 0.0) || (fmt->ellipsis > 1.0))
fmt->ellipsis = -1.0;
else
{
Evas_Object_Textblock *o;
o = (Evas_Object_Textblock *)(obj->object_data);
o->have_ellipsis = 1;
}
}
if (new_font)
@ -3755,6 +3763,7 @@ _relayout(const Evas_Object *obj)
Evas_Object_Textblock *o;
o = (Evas_Object_Textblock *)(obj->object_data);
o->have_ellipsis = 0;
_layout(obj,
0,
obj->cur.geometry.w, obj->cur.geometry.h,
@ -8645,7 +8654,8 @@ evas_object_textblock_render_pre(Evas_Object *obj)
o = (Evas_Object_Textblock *)(obj->object_data);
if ((o->changed) || (o->content_changed) ||
((obj->cur.geometry.w != o->last_w) ||
((o->valign != 0.0) && (obj->cur.geometry.h != o->last_h))))
(((o->valign != 0.0) || (o->have_ellipsis)) &&
(obj->cur.geometry.h != o->last_h))))
{
o->formatted.valid = 0;
_layout(obj,
@ -8802,7 +8812,8 @@ evas_object_textblock_coords_recalc(Evas_Object *obj)
o = (Evas_Object_Textblock *)(obj->object_data);
if ((obj->cur.geometry.w != o->last_w) ||
((o->valign != 0.0) && (obj->cur.geometry.h != o->last_h)))
(((o->valign != 0.0) || (o->have_ellipsis)) &&
(obj->cur.geometry.h != o->last_h)))
{
o->formatted.valid = 0;
o->changed = 1;