edje: fix text and table with fixed point and clamp image tween.

SVN revision: 71152
This commit is contained in:
Cedric BAIL 2012-05-16 10:37:44 +00:00
parent 671b3bad30
commit 0f490ba1dc
6 changed files with 30 additions and 15 deletions

View File

@ -457,3 +457,8 @@
and fastdecomp - LZ4 and LZ4HC).
* Overall sped up edje_cc by 4x faster (if you use fastcomp)
and about 4.5x faster with old zlib compression.
2012-05-16 Cedric Bail
* Fix table and text when fixed point is turned on.
* Clamp image tween to never underflow also.

View File

@ -16,6 +16,8 @@ Fixes:
* Prevent crash when running nested edje_object_signal_emit with edje_object_signal_callback_{add,del}.
* Do actually verify that the file on disk is different from the file we have loaded.
* Preserve user drag, box and table information during call of edje_object_file_set.
* Fix table and text when fixed point is turned on.
* Clamp image tween to never underflow also.
Edje 1.2.0

View File

@ -50,10 +50,14 @@ read_watch_file(const char *file)
Eina_Bool
rebuild(void *data __UNUSED__)
{
double start, end;
start = ecore_time_get();
fprintf(stderr, "SYSTEM('%s')\n", edje_cc_command);
if (system(edje_cc_command) == 0)
read_watch_file(watchfile);
fprintf(stderr, "DONE\n");
end = ecore_time_get();
fprintf(stderr, "DONE IN %f\n", end - start);
timeout = NULL;
return EINA_FALSE;
@ -76,6 +80,7 @@ main(int argc, char **argv)
{
char *watchout;
Eina_Strbuf *buf;
double start, end;
int tfd;
int i;
@ -105,7 +110,7 @@ main(int argc, char **argv)
buf = eina_strbuf_new();
if (!buf) return -1;
eina_strbuf_append_printf(buf, "%s/edje_cc -w %s ", PACKAGE_BIN_DIR, watchfile);
eina_strbuf_append_printf(buf, "%s/edje_cc -fastcomp -w %s ", PACKAGE_BIN_DIR, watchfile);
for (i = 1; i < argc; ++i)
eina_strbuf_append_printf(buf, "%s ", argv[i]);
@ -113,10 +118,12 @@ main(int argc, char **argv)
eina_strbuf_free(buf);
start = ecore_time_get();
fprintf(stderr, "SYSTEM('%s')\n", edje_cc_command);
system(edje_cc_command);
read_watch_file(watchfile);
fprintf(stderr, "DONE\n");
end = ecore_time_get();
fprintf(stderr, "DONE %f\n", end - start);
ecore_main_loop_begin();

View File

@ -402,7 +402,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T pos)
FROM_DOUBLE(0.5))));
if (image_num > (image_count - 1))
image_num = image_count - 1;
if (image_num == 0)
if (image_num <= 0)
{
image_id = _edje_image_find(ep->object, ed,
&ep->param1.set,
@ -1173,7 +1173,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
if (*maxh < *minh) *maxh = *minh;
}
}
evas_object_textblock_valign_set(ep->object, chosen_desc->text.align.y);
evas_object_textblock_valign_set(ep->object, TO_DOUBLE(chosen_desc->text.align.y));
}
}
@ -2410,6 +2410,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
return;
}
pos = ep->description_pos;
if (ep->part->type == EDJE_PART_TYPE_PROXY)
{
Edje_Real_Part *pp;
@ -2534,10 +2536,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
#endif
}
pos = ep->description_pos;
pos2 = pos;
if (pos2 < ZERO) pos2 = ZERO;
else if (pos2 > FROM_INT(1)) pos2 = FROM_INT(1);
pos2 = pos;
if (pos2 < ZERO) pos2 = ZERO;
else if (pos2 > FROM_INT(1)) pos2 = FROM_INT(1);
beginning_pos = (pos < FROM_DOUBLE(0.5));
part_type = ep->part->type;

View File

@ -1625,8 +1625,8 @@ _edje_object_pack_item_hints_set(Evas_Object *obj, Edje_Pack_Element *it)
evas_object_size_hint_request_set(obj, it->prefer.w, it->prefer.h);
evas_object_size_hint_max_set(obj, it->max.w, it->max.h);
evas_object_size_hint_padding_set(obj, it->padding.l, it->padding.r, it->padding.t, it->padding.b);
evas_object_size_hint_align_set(obj, it->align.x, it->align.y);
evas_object_size_hint_weight_set(obj, it->weight.x, it->weight.y);
evas_object_size_hint_align_set(obj, TO_DOUBLE(it->align.x), TO_DOUBLE(it->align.y));
evas_object_size_hint_weight_set(obj, TO_DOUBLE(it->weight.x), TO_DOUBLE(it->weight.y));
evas_object_size_hint_aspect_set(obj, it->aspect.mode, it->aspect.w, it->aspect.h);
evas_object_resize(obj, w, h);

View File

@ -587,17 +587,17 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
part_get_geometry(ep, &tw, &th);
/* Handle alignment */
{
double align_x;
if (params->type.text.align.x < 0.0)
FLOAT_T align_x;
if (params->type.text.align.x < FROM_INT(0))
{
if (evas_object_text_direction_get(ep->object) ==
EVAS_BIDI_DIRECTION_RTL)
{
align_x = 1.0;
align_x = FROM_INT(1);
}
else
{
align_x = 0.0;
align_x = FROM_INT(0);
}
}
else