Tom! This is so good. I waited this patch for so long. Sorry I was too busy to fix this. ; or lazy :)
Thanks! Daniel Juyung Seo (SeoZ) On Wed, Apr 6, 2011 at 4:51 PM, Enlightenment SVN < [email protected]> wrote: > Log: > Elementary smart-scroller: Fixed scroller "jumping" in some cases. > > In some cases, for example resizing the GenGrid test or just using > ephoto, the scroller would jump to the right before going to it's > proper direction. We should check if the position is below minimum > after we reduce the position, and not instead. > > Author: tasn > Date: 2011-04-06 00:51:26 -0700 (Wed, 06 Apr 2011) > New Revision: 58383 > Trac: http://trac.enlightenment.org/e/changeset/58383 > > Modified: > trunk/elementary/src/lib/els_scroller.c > > Modified: trunk/elementary/src/lib/els_scroller.c > =================================================================== > --- trunk/elementary/src/lib/els_scroller.c 2011-04-06 07:37:13 UTC > (rev 58382) > +++ trunk/elementary/src/lib/els_scroller.c 2011-04-06 07:51:26 UTC > (rev 58383) > @@ -585,8 +585,8 @@ > x = x / (sd->pagesize_h); > x = x * (sd->pagesize_h); > } > + if ((x + w) > cw) x = cw - w; > if (x < minx) x = minx; > - else if ((x + w) > cw) x = cw - w; > return x; > } > > @@ -614,8 +614,8 @@ > y = y / (sd->pagesize_v); > y = y * (sd->pagesize_v); > } > + if ((y + h) > ch) y = ch - h; > if (y < miny) y = miny; > - else if ((y + h) > ch) y = ch - h; > return y; > } > > @@ -1061,11 +1061,11 @@ > sd->down.pdy = 0; > } > x = nx; > + if ((x + w) > cw) x = cw - w; > if (x < minx) x = minx; > - else if ((x + w) > cw) x = cw - w; > y = ny; > + if ((y + h) > ch) y = ch - h; > if (y < miny) y = miny; > - else if ((y + h) > ch) y = ch - h; > elm_smart_scroller_child_pos_set(obj, x, y); > } > > @@ -1341,12 +1341,12 @@ > sd->down.pdy = 0; > } > x = nx; > + if ((x + w) > cw) x = cw - w; > if (x < minx) x = minx; > - else if ((x + w) > cw) x = cw - w; > _smart_scrollto_x(sd, _elm_config->bring_in_scroll_friction, x); > y = ny; > + if ((y + h) > ch) y = ch - h; > if (y < miny) y = miny; > - else if ((y + h) > ch) y = ch - h; > _smart_scrollto_y(sd, _elm_config->bring_in_scroll_friction, y); > } > > > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
