part_hierarchy = NULL;
}
-static Eina_Bool
-_part_text_ellipsis_check(Edje_Part *ep, Edje_Part_Description_Common *desc)
-{
- Edje_Part_Description_Text *ed;
-
- if ((ep->type != EDJE_PART_TYPE_TEXT) && (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
- return EINA_FALSE;
-
- ed = (Edje_Part_Description_Text*)desc;
-
- return ((ed->text.ellipsis != -1) && ed->text.min_x);
-}
-
static void
edje_cc_handlers_hierarchy_pop(void)
{ /* Remove part from hierarchy stack when finished parsing it */
file_in, line - 1, current_de->entry, current_part->name);
exit(-1);
}
- if (_part_text_ellipsis_check(current_part, current_part->other.desc[i]))
- {
- WRN("Part '%s' in group '%s' contains description '%s:%g' which has text.min: 1 X; but not text.ellipsis: -1;",
- current_part->name, current_de->entry,
- current_part->other.desc[i]->state.name, current_part->other.desc[i]->state.value);
- WRN("This is almost certainly not what you want.");
- }
}
/* auto-add default desc if it was omitted */
if (!current_part->default_desc)
ob_collections_group_parts_part_description();
- else if (_part_text_ellipsis_check(current_part, current_part->default_desc))
- {
- WRN("Part '%s' in group '%s' contains description '%s:%g' which has text.min: 1 X; but not text.ellipsis: -1;",
- current_part->name, current_de->entry,
- current_part->default_desc->state.name, current_part->default_desc->state.value);
- WRN("This is almost certainly not what you want.");
- }
}
if (info)
if (chosen_desc->text.max_x)
{
- if ((*maxw < 0) || (mw < *maxw)) *maxw = mw;
+ if ((*maxw < 0) || (mw > *maxw)) *maxw = mw;
}
if (chosen_desc->text.max_y)
{
- if ((*maxh < 0) || (mh < *maxh)) *maxh = mh;
+ if ((*maxh < 0) || (mh > *maxh)) *maxh = mh;
}
if (chosen_desc->text.min_x)
{
if (mw > *minw) *minw = mw;
+ if ((*maxw > -1) && (*minw > *maxw)) *minw = *maxw;
}
if (chosen_desc->text.min_y)
{
if (mh > *minh) *minh = mh;
+ if ((*maxh > -1) && (*minh > *maxh)) *minh = *maxh;
}
+ if ((*maxw > -1) && (mw > *maxw)) mw = *maxw;
+ if ((*maxh > -1) && (mh > *maxh)) mh = *maxh;
+
+ evas_object_resize(ep->object, mw, mh);
}
#else
if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
eo_do(ep->object,
- evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
+ evas_obj_text_ellipsis_set(params->type.text.ellipsis),
efl_text_properties_font_set(font, size),
efl_text_set(text),
efl_gfx_size_set(sw, sh));
text, font, size,
sw, sh, &free_text);
}
- /* when evas ellipsis support was added in efl 1.8 and used to replace
- * previous support, SOMEONE, who I shall call "cedric", borked ellipsis
- * defaults. as a result, edje_cc continued using 0.0 (left-most) as its default value
- * for ellipsis while evas used -1.0 (no ellipsizing).
- * this was moderately okay for a time because nobody was using it or GROUP parts
- * with text in them very frequently, and so nobody noticed that the mismatch was breaking
- * sizing in some cases when the edje ellipsis value failed to be applied,
- * which occurred any time text.min_x was set; in this case, ellipsis would NEVER be
- * correctly applied, and instead the text object would only ever get the first
- * ellipsis_set(0), permanently breaking the part.
- * the only way to fix this while preserving previous behavior was to bump
- * the edje file minor version and then check it here to ignore "unset" ellipsis
- * values from old file versions.
- * the downside is that this will break old files which have text.min_x set to 0...maybe.
- *
- * -zmike
- * 22 April 2014
- */
- else if (((ed->file->version >= 3) && (ed->file->minor >= 6)) ||
- params->type.text.ellipsis)
- evas_object_text_ellipsis_set(ep->object,
- chosen_desc->text.min_x ? -1 : params->type.text.ellipsis);
+ else if ((ed->file->version >= 3) && (ed->file->minor >= 6))
+ {
+ evas_object_text_ellipsis_set(ep->object,
+ params->type.text.ellipsis);
+ }
eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
ep->typedata.text->cache.in_w = sw;