kivy/kivy — pull request #1478 by matham (2013-09-02 07:02:12+00:00)
Title: Add options to ScrollView similar to desktop environments

I'm closing https://github.com/kivy/kivy/pull/1106 and opening this instead. The basic idea is similar, but I have implemented it differently. For each behavior that is needed on a desktop, I added a new option and initialized it based on the config desktop parameter.

The first commit removes the StencilView dependency and implements the stencil code in ScrollView natively. This is needed because for the second commit, where the scroll bars are permanently displayed I didn't want the bars to obscure the stuff underneath it. So the stencil view is shortened to not show widgets underneath the bars in that case.

Then I also added a option where dragging down scrolls down instead of up etc. And where a single scroll can scroll through the whole widget. Unfortunately, the second part isn't implemented yet, because in order to do that I'd need to be able to tell the kinetic effects to scale each drag by some value, but that isn't possible. I'm don't feel comfortable with the kinetics yet to implement that.

Finally, I added a option to enable scrolling only if the scrolling was initiated from over a scroll bar. This resolves my issues of having to wait the timeout period on a desktop, because if this is enabled, only touches on top of the bars will be read so clicks inside the view will be processed immediately.

.All of these options should be able to be enabled/disabled independently.