Hmmm, timing ?
Suspect....
small/large...all the same..
dH
[EMAIL PROTECTED] wrote:
> Author: raster
> Date: 2008-09-09 23:39:57 -0700 (Tue, 09 Sep 2008)
> New Revision: 35922
>
> Modified:
> trunk/edje/src/lib/edje_calc.c trunk/edje/src/lib/edje_private.h
> trunk/edje/src/lib/edje_util.c
> Log:
>
> fix scaling on edje_scale - works with smnall sizes now too. problem is
> really i was chasing a freeze/thaw problem. something is up.
>
>
>
> Modified: trunk/edje/src/lib/edje_calc.c
> ===================================================================
> --- trunk/edje/src/lib/edje_calc.c 2008-09-10 05:47:13 UTC (rev 35921)
> +++ trunk/edje/src/lib/edje_calc.c 2008-09-10 06:39:57 UTC (rev 35922)
> @@ -138,9 +138,13 @@
> {
> int i;
>
> - if (!ed->dirty) return;
> - if (ed->freeze)
> + if (!ed->dirty)
> {
> + return;
> + }
> + if ((ed->freeze > 0) || (_edje_freeze_val > 0))
> + {
> + _edje_freeze_calc_count++;
> ed->recalc = 1;
> if (!ed->calc_only) return;
> }
> @@ -257,45 +261,79 @@
> // if (flags & FLAG_X)
> {
> minw = desc->min.w;
> - if (ep->swallow_params.min.w > desc->min.w) minw =
> ep->swallow_params.min.w;
> + if (ep->part->scale) minw = (int)(((double)minw) * _edje_scale);
> + if (ep->swallow_params.min.w > desc->min.w)
> + minw = ep->swallow_params.min.w;
>
> /* XXX TODO: remove need of EDJE_INF_MAX_W, see edje_util.c */
> if ((ep->swallow_params.max.w <= 0) ||
> (ep->swallow_params.max.w == EDJE_INF_MAX_W))
> - maxw = desc->max.w;
> + {
> + maxw = desc->max.w;
> + if (maxw > 0)
> + {
> + if (ep->part->scale) maxw = (int)(((double)maxw) *
> _edje_scale);
> + if (maxw < 1) maxw = 1;
> + }
> + }
> else
> {
> if (desc->max.w <= 0)
> maxw = ep->swallow_params.max.w;
> else
> - maxw = MIN(ep->swallow_params.max.w, desc->max.w);
> + {
> + maxw = desc->max.w;
> + if (maxw > 0)
> + {
> + if (ep->part->scale) maxw = (int)(((double)maxw) *
> _edje_scale);
> + if (maxw < 1) maxw = 1;
> + }
> + if (ep->swallow_params.max.w < maxw)
> + maxw = ep->swallow_params.max.w;
> + }
> }
> - if (ep->part->scale)
> + if (maxw >= 0)
> {
> - minw *= _edje_scale;
> - maxw *= _edje_scale;
> + if (maxw < minw) maxw = minw;
> }
> }
> // if (flags & FLAG_Y)
> {
> minh = desc->min.h;
> - if (ep->swallow_params.min.h > desc->min.h) minh =
> ep->swallow_params.min.h;
> + if (ep->part->scale) minh = (int)(((double)minh) * _edje_scale);
> + if (ep->swallow_params.min.h > desc->min.h)
> + minh = ep->swallow_params.min.h;
>
> /* XXX TODO: remove need of EDJE_INF_MAX_H, see edje_util.c */
> if ((ep->swallow_params.max.h <= 0) ||
> (ep->swallow_params.max.h == EDJE_INF_MAX_H))
> - maxh = desc->max.h;
> + {
> + maxh = desc->max.h;
> + if (maxh > 0)
> + {
> + if (ep->part->scale) maxh = (int)(((double)maxh) *
> _edje_scale);
> + if (maxh < 1) maxh = 1;
> + }
> + }
> else
> {
> if (desc->max.h <= 0)
> maxh = ep->swallow_params.max.h;
> else
> - maxh = MIN(ep->swallow_params.max.h, desc->max.h);
> + {
> + maxh = desc->max.h;
> + if (maxh > 0)
> + {
> + if (ep->part->scale) maxh = (int)(((double)maxh) *
> _edje_scale);
> + if (maxh < 1) maxh = 1;
> + }
> + if (ep->swallow_params.max.h < maxh)
> + maxh = ep->swallow_params.max.h;
> + }
> }
> - if (ep->part->scale)
> + if (maxh >= 0)
> {
> - minh *= _edje_scale;
> - maxh *= _edje_scale;
> + if (maxh < minh) maxh = minh;
> }
> }
> /* relative coords of top left & bottom right */
>
> Modified: trunk/edje/src/lib/edje_private.h
> ===================================================================
> --- trunk/edje/src/lib/edje_private.h 2008-09-10 05:47:13 UTC (rev 35921)
> +++ trunk/edje/src/lib/edje_private.h 2008-09-10 06:39:57 UTC (rev 35922)
> @@ -1004,6 +1004,8 @@
>
> extern char *_edje_fontset_append;
> extern double _edje_scale;
> +extern int _edje_freeze_val;
> +extern int _edje_freeze_calc_count;
>
> void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, double pos);
> Edje_Part_Description *_edje_part_description_find(Edje *ed, Edje_Real_Part
> *rp, const char *name, double val);
>
> Modified: trunk/edje/src/lib/edje_util.c
> ===================================================================
> --- trunk/edje/src/lib/edje_util.c 2008-09-10 05:47:13 UTC (rev 35921)
> +++ trunk/edje/src/lib/edje_util.c 2008-09-10 06:39:57 UTC (rev 35922)
> @@ -12,6 +12,8 @@
>
> char *_edje_fontset_append = NULL;
> double _edje_scale = 1.0;
> +int _edje_freeze_val = 0;
> +int _edje_freeze_calc_count = 0;
>
> typedef struct _Edje_List_Foreach_Data Edje_List_Foreach_Data;
>
> @@ -29,6 +31,8 @@
>
> /* FIXDOC: These all need to be looked over, Verified/Expanded upon. I just
> got lazy and stopped putting FIXDOC next to each function in this file. */
>
> +//#define FASTFREEZE 1
> +
> /** Freeze all Edje objects in the current process.
> *
> * See edje_object_freeze() for more.
> @@ -36,11 +40,17 @@
> EAPI void
> edje_freeze(void)
> {
> +#ifdef FASTFREEZE
> + _edje_freeze_val++;
> + printf("fr ++ ->%i\n", _edje_freeze_val);
> +#else
> +// FIXME: could just have a global freeze instead of per object
> +// above i tried.. but this broke some things. notable e17's menus. why?
> Evas_List *l;
>
> - // FIXME: could just have a global freeze instead of per object
> for (l = _edje_edjes; l; l = l->next)
> edje_object_freeze((Evas_Object *)(l->data));
> +#endif
> }
>
> /** Thaw all Edje objects in the current process.
> @@ -50,11 +60,39 @@
> EAPI void
> edje_thaw(void)
> {
> +#ifdef FASTFREEZE
> + _edje_freeze_val--;
> + printf("fr -- ->%i\n", _edje_freeze_val);
> + if ((_edje_freeze_val == 0) && (_edje_freeze_calc_count > 0))
> + {
> + Evas_List *l;
> +
> + _edje_freeze_calc_count = 0;
> + for (l = _edje_edjes; l; l = l->next)
> + {
> + Edje *ed;
> +
> + ed = _edje_fetch(l->data);
> + if (ed->recalc)
> + {
> + if (ed->freeze == 0)
> + {
> + printf(" CALC %p\n", l->data);
> + _edje_recalc(ed);
> + }
> + else
> + printf(" !CALC %p\n", l->data);
> + }
> + }
> + }
> +#else
> +// FIXME: could just have a global freeze instead of per object
> +// comment as above.. why?
> Evas_List *l;
>
> - // FIXME: could just have a global freeze instead of per object
> for (l = _edje_edjes; l; l = l->next)
> edje_object_thaw((Evas_Object *)(l->data));
> +#endif
> }
>
> /* FIXDOC: Expand */
> @@ -1138,15 +1176,22 @@
> edje_object_calc_force(Evas_Object *obj)
> {
> Edje *ed;
> - int pf;
> + int pf, pf2;
>
> ed = _edje_fetch(obj);
> if (!ed) return;
> ed->dirty = 1;
> +
> + pf2 = _edje_freeze_val;
> pf = ed->freeze;
> +
> + _edje_freeze_val = 0;
> ed->freeze = 0;
> +
> _edje_recalc(ed);
> +
> ed->freeze = pf;
> + _edje_freeze_val = pf2;
> }
>
> /** Calculate minimum size
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> enlightenment-svn mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel