drag able etk_scrolled_view

Carsten Haitzler (The Rasterman) raster at openmoko.org
Mon Mar 31 20:40:04 CEST 2008


On Mon, 31 Mar 2008 18:51:07 +0800 Tick <tick at openmoko.com> babbled:

ok took a look.

drag_and_scroll.patch:

fine - problem though. formatting. you aren't following existing code
formatting in ETK. it is always good to format your code the way it is already
formatted in the code you are patching. you need to put {} on new lines (not on
the existing line) and there are spaces between X, == and Y in X==y for example
it is X == Y. so just with formatting - reformat to it matches.

motivate_scroll.patch:
same as above - formatting. as for timestamps. if events stop for 0.2 seconds
you reset the start x/y - you may want to be more generous with this as on a
real device the change of a gap of > 0.2 seconds between events is actually
very high - you may have 0.5 or more. bounce_check() should also probably be
namespaced as _etk_scrolled_view_bounce_check() for example.

policy_drag.patch:
formatting again. bounce_check() again.

policy_set.patch:
formatting :)

other than that overall looks fine. :)  you may want to add something to
etk_config.c to be able to store and set a global default for the dragable
flag, so you can make all etk scrolled views dragable by default just via
configuration. more some magic numbers (like 0.2) into config. :)

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Raster,
> ~    I had wrote some patches make Etk_Scrolled_View  drag able.
> The patches are on 
> http://people.openmoko.org/tick/motion_scrolled_view/patches/
> After patching these patches you can make the etk_scrolled_view 
> scrollable with finger press + drag.
> A little bit like kinetic_scrollpane in EWL.
> If you drag the scrolled_view fast and release it will continue drag for 
> a while and the slow down. It will bounce if reaching the boundary.
> 
> Would you take a look of this.
> If you think it's okay, would you commit that for me?
> Or point out what I should fix? Thanks a lot.
> 
> Cheers,
> Tick
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFH8MIaPNWONWpVfqoRAh8uAJ4iy8lCxT/RFrm+bW/k6cryrAhViQCeLezq
> 5LlOPHWVG8oMnKt/kjlSYf0=
> =D5ya
> -----END PGP SIGNATURE-----
> 


-- 
Carsten Haitzler (The Rasterman) <raster at openmoko.org>



More information about the openmoko-devel mailing list