On 06/09/12 19:03, Christopher Michael wrote:
> Ok, so I modified the evas_object_move and evas_object_geometry_get 
> functions to work with all evas objects now (not just smart objects, but 
> rectangles, etc, etc). Every example in ecore_evas/src/examples works 
> well now without modification ... with ONE exception. (elm breakage 
> because of this is another story that I have not really dug into yet)

Yay. :)
> 
> That exception is this:
> 
> Since evas_object_move handles adding the framespace to the object 
> (geometry_get will subtract it), the examples do not work without an 
> evas_object_move first. Here is a bit of example code (taken from 
> ecore_evas_basics_example.c):
> 
>     bg = evas_object_rectangle_add(canvas);
>     evas_object_color_set(bg, 0, 0, 255, 255);
>     evas_object_resize(bg, 200, 200);
>     evas_object_show(bg);
>     ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
> 
> This will fail (in that bg will not be in the proper position) because 
> evas_object_move is not called for it (to adjust position for 
> framespace). Sadly, I am seeing a lot of this in the examples 
> (evas_object_move not being called)...which means it is probably being 
> done the same way in various code all over the place.

Ah, good job spotting that. :)
> 
> There are two ways to handle this (as I see it). One, we can add the 
> evas_object_move to the examples and require that people call 
> evas_object_move after object creation in their code). Not an ideal 
> solution imo :/
> 
> The other thing we could do is, in evas_object_add (or somewhere 
> appropriate), add the framespace adjustments during object creation. 
> This approach seems more viable imo. If we add it there, there is no 
> problem with evas_object_move because it already checks if the object is 
> in framespace or not. Since the framespace adjustments would be made at 
> creation, then evas_object_move will see that it's not in framespace and 
> thus not Re-add the framespace values.

The second approach sounds perfect to me.

--
Tom.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to