It looks like the author is Sumanth as Prince mentioned in his email.

Daniel Juyung Seo (SeoZ)
On Sep 13, 2012 8:55 PM, "Enlightenment SVN" <[email protected]>
wrote:

> Log:
> From: PRINCE KUMAR DUBEY <[email protected]>
>   Subject: [E-devel] [Patch] [Elementary] Support for circular effect in
>   elm_diskselector, in case scroller's bounce effect is disabled.
>
>   Can someone please review the attached patch created by Sumanth.
>
>   [Issue Details] :
>   elm_diskselector_round_enable_set() API is not working, if
>   elm_scroller's bounce effect is disabled.
>
>   [Root cause] :
>   For diskselector circular effect, the boundary checking is done based
>   on scroller's geometry.
>   If bouncing effect is disabled in elm_scroller, its geometry can lie
>   between 0 on left and CHILD_SIZE on right but it can never go beyond
>   that point.
>   Unless the scroller's geometry goes beyond its child (here, elm_box)
>   size, diskselector cann't trigger the circular effect.
>
>   [Change Description] :
>   For diskselector items circular effect, the boundary checking is
>   performed at the left/right edges of its child, elm_box.
>   Once the scroller reaches to the left/right edge of box or goes beyond
>   that point, circular effect will be triggered.
>
>
>
> Author:       raster
> Date:         2012-09-13 04:55:24 -0700 (Thu, 13 Sep 2012)
> New Revision: 76606
> Trac:         http://trac.enlightenment.org/e/changeset/76606
>
> Modified:
>   trunk/elementary/ChangeLog trunk/elementary/NEWS
> trunk/elementary/src/lib/elm_diskselector.c
> trunk/elementary/src/lib/elm_widget_diskselector.h
>
> Modified: trunk/elementary/ChangeLog
> ===================================================================
> --- trunk/elementary/ChangeLog  2012-09-13 11:28:27 UTC (rev 76605)
> +++ trunk/elementary/ChangeLog  2012-09-13 11:55:24 UTC (rev 76606)
> @@ -481,3 +481,7 @@
>  2012-09-12  Davide Andreoli (davemds)
>
>         * Add external property "play length" to Video widget, read-only.
> +
> +2012-09-13  Prince Kumar Dubey
> +
> +       * Fix diskselector when bounce off and round enabled.
>
> Modified: trunk/elementary/NEWS
> ===================================================================
> --- trunk/elementary/NEWS       2012-09-13 11:28:27 UTC (rev 76605)
> +++ trunk/elementary/NEWS       2012-09-13 11:55:24 UTC (rev 76606)
> @@ -23,7 +23,8 @@
>     * Now elm_datetime_field_limit_set() can set year limits wihtout
> problems.
>     * Fix re-order animation when it doesn't end correctly.
>     * Fix popup to apply the same style to the notify sub-widget.
> -   * Fix Ctxpopup direction if -1 priority used
> +   * Fix Ctxpopup direction if unknown priority used.
> +   * Fix diskselector when bounce off and round enabled.
>
>  Removals:
>
>
> Modified: trunk/elementary/src/lib/elm_diskselector.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_diskselector.c 2012-09-13 11:28:27 UTC
> (rev 76605)
> +++ trunk/elementary/src/lib/elm_diskselector.c 2012-09-13 11:55:24 UTC
> (rev 76606)
> @@ -848,7 +848,9 @@
>  _scroll_cb(Evas_Object *obj,
>             void *data __UNUSED__)
>  {
> -   Evas_Coord x, y, w, h, bw;
> +   Evas_Coord x, y, w, h, bw, x_boundary;
> +   unsigned int adjust_pixels;
> +   Eina_Bool h_bounce;
>
>     ELM_DISKSELECTOR_DATA_GET(obj, sd);
>
> @@ -858,15 +860,41 @@
>     if (sd->round)
>       {
>          evas_object_geometry_get(sd->main_box, NULL, NULL, &bw, NULL);
> -        if (x > ((w / sd->display_item_num) * (sd->item_count
> -                                               + (sd->display_item_num %
> 2))))
> -          sd->s_iface->content_region_show
> -            (obj, x - ((w / sd->display_item_num) * sd->item_count),
> -            y, w, h);
> -        else if (x < 0)
> -          sd->s_iface->content_region_show
> -            (obj, x + ((w / sd->display_item_num) * sd->item_count),
> -            y, w, h);
> +        x_boundary = bw - w;
> +
> +        if (x >= x_boundary)
> +          {
> +              if (sd->left_boundary_reached) return;
> +
> +              sd->right_boundary_reached = EINA_TRUE;
> +              sd->s_iface->bounce_allow_get(obj, &h_bounce, NULL);
> +              /* If scroller's bounce effect is disabled, add 1 pixel
> +               *  to provide circular effect */
> +              adjust_pixels = (_elm_config->thumbscroll_bounce_enable
> +                               && h_bounce) ? 0 : 1;
> +              sd->s_iface->content_region_show
> +                 (obj, x - x_boundary + adjust_pixels, y, w, h);
> +              sd->left_boundary_reached = EINA_FALSE;
> +          }
> +        else if (x <= 0)
> +          {
> +              if (sd->right_boundary_reached) return;
> +
> +              sd->left_boundary_reached = EINA_TRUE;
> +              sd->s_iface->bounce_allow_get(obj, &h_bounce, NULL);
> +              /* If scroller's bounce effect is disabled, subtract 1 pixel
> +               *  to provide circular effect */
> +              adjust_pixels = (_elm_config->thumbscroll_bounce_enable
> +                               && h_bounce) ? 0 : 1;
> +              sd->s_iface->content_region_show
> +                 (obj, x + x_boundary - adjust_pixels, y, w, h);
> +              sd->right_boundary_reached = EINA_FALSE;
> +          }
> +        else
> +          {
> +              sd->left_boundary_reached = EINA_FALSE;
> +              sd->right_boundary_reached = EINA_FALSE;
> +          }
>       }
>  }
>
>
> Modified: trunk/elementary/src/lib/elm_widget_diskselector.h
> ===================================================================
> --- trunk/elementary/src/lib/elm_widget_diskselector.h  2012-09-13
> 11:28:27 UTC (rev 76605)
> +++ trunk/elementary/src/lib/elm_widget_diskselector.h  2012-09-13
> 11:55:24 UTC (rev 76606)
> @@ -151,6 +151,8 @@
>     Eina_Bool                             init : 1;
>     Eina_Bool                             round : 1;
>     Eina_Bool                             display_item_num_by_api : 1;
> +   Eina_Bool                             left_boundary_reached:1;
> +   Eina_Bool                             right_boundary_reached:1;
>  };
>
>  struct _Elm_Diskselector_Item
>
>
>
> ------------------------------------------------------------------------------
> 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-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to