On Thu, 20 Jan 2011 06:35:24 +0000 (GMT) Jae Hwan Kim
<jae.hwan....@samsung.com> said:

you are right with your cases. the intent is that when a widget gets focused -
it is made visible IF it is not fully visible. in some cases its impossible to
make ti fully visible (object exceeds scroller bounds in size), so there is
little point moving the scroller at all. so leave it as-is. patch applied to
svn. thanks!

> 
> Hello all,
> 
> I have some issue in scroller.
> Sometimes the scroller move to wrong region when the child get first focus.
> It use "scroller -> layout -> button".
> So I checked the code and found a suspected thing in
> elm_smart_scroller_child_region_show. Please refer following pictures.
> 
> In the pictures, the rect which be written "x, y, w, h" is the area 
> which be made with the parameters of "elm_smart_scroller_child_region_show".
> The rect which be written "Pan" is the pan area of the scroller.
> 
> If the situation is 1) or 2) and the function is called, the result have to
> be 7). In case of 3) or 4), it have to be 8).
> In case of 5) or 6), it have to remain as it is.
> Is it right??
> 
> But if the situation is 6) and the function is called, the result will be 7)
> in current code. I think it is wrong.
> I attached patch code. please find it below the pictures. 
> Please check it.
> 
> Thanks.
> 
> 1)
>     ---------------
>     |                    |
>     |   x, y, w, h   |
>     |                    |
>     ---------------
> ---------------------
> |                             |
> |                             |
> |                             |
> |            Pan           |
> |                             |
> |                             |
> |                             |
> ---------------------
> 
> 2)
>     ---------------
>     |                    |
>     |   x, y, w, h   |
> ---------------------
> |   |                    |   |
> |   ---------------   |
> |                             |
> |            Pan           |
> |                             |
> |                             |
> |                             |
> ---------------------
> 
> 3)
> ---------------------
> |                             |
> |                             |
> |                             |
> |            Pan           |
> |                             |
> |   ---------------   |
> |   |                   |    |
> ---------------------
>     |   x, y, w, h   |
>     |                    |
>     ---------------
> 
> 4)
> ---------------------
> |                             |
> |                             |
> |                             |
> |            Pan           |
> |                             |
> |                             |
> |                             |
> ---------------------
>     ---------------
>     |                    |
>     |   x, y, w, h   |
>     |                    |
>     ---------------
> 
> 5)
> ---------------------
> |                             |
> |   ---------------   |
> |   |                    |   |
> |   |   x, y, w, h   |   |
> |   |                    |   |
> |   ---------------   |
> |            Pan           |
> ---------------------
> 
> 6)
>     ---------------
>     |                    |
> ---------------------     <---Pan
> |   |                   |    |
> |   |   x, y, w, h  |    |
> |   |                   |    |
> ---------------------
>     |                    |
>     ---------------
> 
> 7)
> ---------------------
> |   |                    |   |
> |   |   x, y, w, h   |   |
> |   |                    |   |
> |   ---------------   |
> |                             |
> |            Pan           |
> |                             |
> ---------------------
> 
> 8)
> ---------------------
> |                             |
> |            Pan           |
> |                             |
> |   ---------------   |
> |   |                    |   |
> |   |   x, y, w, h   |   |
> |   |                    |   |
> ---------------------
> 
> Patch Code
> ----------------------------------------------------------------------------------
> 
> Index: src/lib/els_scroller.c
> ===================================================================
> --- src/lib/els_scroller.c    (revision 56235)
> +++ src/lib/els_scroller.c    (working copy)
> @@ -928,19 +928,11 @@ elm_smart_scroller_child_region_show(Evas_Object *
>     sd->pan_func.get(sd->pan_obj, &px, &py);
>  
>     nx = px;
> -   if (x < px) nx = x;
> -   else if ((x + w) > (px + (cw - mx)))
> -     {
> -     nx = x + w - (cw - mx);
> -     if (nx > x) nx = x;
> -     }
> +   if ((x < px) && ((x + w) < (px + (cw - mx)))) nx = x;
> +   else if ((x > px) && ((x + w) > (px + (cw - mx)))) nx = x + w - (cw - mx);
>     ny = py;
> -   if (y < py) ny = y;
> -   else if ((y + h) > (py + (ch - my)))
> -     {
> -     ny = y + h - (ch - my);
> -     if (ny > y) ny = y;
> -     }
> +   if ((y < py) && ((y + h) < (py + (ch - my)))) ny = y;
> +   else if ((y > py) && ((y + h) > (py + (ch - my)))) ny = y + h - (ch - my);
>     if ((nx == px) && (ny == py)) return;
>     if ((sd->down.bounce_x_animator) || (sd->down.bounce_y_animator) ||
>         (sd->scrollto.x.animator) || (sd->scrollto.y.animator))
> 
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand 
> malware threats, the impact they can have on your business, and how you 
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to