drag able etk_scrolled_view
Tick
tick at openmoko.com
Tue Apr 1 14:32:22 CEST 2008
Hi Raster,
Thanks a lot pointing out these points.
I had add a patch indent_fix.patch to fix to format issues,
rename_bounce_check.patch to fix the naming issus, and
magic_number_config.patch to make those magic number can be configured.
I *didn't* touch the etk_config file to make it global.
But put a FIXME there to point out we can do that.
Also I put comments to each functions.
Would you take a look of them again?
Thanks,
Tick
Carsten Haitzler (The Rasterman) 提到:
> 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. :)
>
> 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
>
> >
More information about the openmoko-devel
mailing list