On 8/1/07, Enlightenment CVS <[EMAIL PROTECTED]> wrote:
> Enlightenment CVS committal
>
> Author  : raster
> Project : e17
> Module  : libs/edje
>
> Dir     : e17/libs/edje/src/lib
>
>
> Modified Files:
>         edje_calc.c
>
>
> Log Message:
>
>
> DONT set color - bad. see comments
>
> ===================================================================
> RCS file: /cvs/e/e17/libs/edje/src/lib/edje_calc.c,v
> retrieving revision 1.106
> retrieving revision 1.107
> diff -u -3 -r1.106 -r1.107
> --- edje_calc.c 8 Jul 2007 17:52:39 -0000       1.106
> +++ edje_calc.c 1 Aug 2007 14:34:10 -0000       1.107
> @@ -1325,7 +1325,8 @@
>              if (p3.visible) evas_object_show(ep->object);
>              else evas_object_hide(ep->object);
>           }
> -       else if (ep->part->type == EDJE_PART_TYPE_SWALLOW || ep->part->type 
> == EDJE_PART_TYPE_GROUP)
> +       else if ((ep->part->type == EDJE_PART_TYPE_SWALLOW) ||
> +                (ep->part->type == EDJE_PART_TYPE_GROUP))
>           {
>              evas_object_move(ep->object, ed->x + p3.x, ed->y + p3.y);
>              evas_object_resize(ep->object, p3.w, p3.h);
> @@ -1379,12 +1380,15 @@
>
>         if (ep->swallowed_object)
>           {
> -            evas_object_color_set(ep->swallowed_object,
> -                                  (p3.color.r * p3.color.a) / 255,
> -                                  (p3.color.g * p3.color.a) / 255,
> -                                  (p3.color.b * p3.color.a) / 255,
> -                                  p3.color.a);
> -
> +//// the below really is wrong - swallow color shouldnt affect swallowed 
> object
> +//// color - the edje color as a WHOLE should though - and that should be
> +//// done via the clipper anyway. this created bugs when objects had their
> +//// colro set and were swallowed - then had their color changed.
> +//          evas_object_color_set(ep->swallowed_object,
> +//                                (p3.color.r * p3.color.a) / 255,
> +//                                (p3.color.g * p3.color.a) / 255,
> +//                                (p3.color.b * p3.color.a) / 255,
> +//                                p3.color.a);
>              evas_object_move(ep->swallowed_object, ed->x + p3.x, ed->y + 
> p3.y);
>              evas_object_resize(ep->swallowed_object, p3.w, p3.h);
>              if (p3.visible) evas_object_show(ep->swallowed_object);

I disagree on this, being the proposal of this changed and discussed a
bit with rephorm, who agreed.

Use case is: I have a part and want it to fade out/in. This part
happens to be a swallowed object. This swallowed object happen to be
another Edje or even GROUP ("group" automatically swallowed from the
same file).

With every other part, I'd write 2 states, one with color 255 255 255
255 and other with 255 255 255 0, then write a "program" that have
"action: STATE_SET "fade_out" 0.0" and "transition: LINEAR 1.0"

But with SWALLOW or GROUP I cannot. Why? No given reason other than
"it was not done". So i did it.

However, it exposed old behavior of setting "color: 0 0 0 0" on
swallows, previously used as RECT. Ok, it's quite hard to track and
fix old mistakes, but does this justify commenting out? Or marking it
as "really is wrong"?

Then you suggest "that should be done via the clipper anyway", ok, but
it requires you to always have a clipper and know it so you can set
its color, breaking the great semantics of Edje and its
program/transitions.

That's why I disagree with this change and want my code back :-D

I thought that you had fixed this for every .edc in CVS, but if it's
not the case I can try to wipe these myself.

-- 
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to