mirror of https://github.com/kivy/kivy.git
Merge pull request #7069 from shreyash/patch-1
Horizontal scrolling disabled if no overflow
This commit is contained in:
commit
d594e1373b
|
@ -895,9 +895,10 @@ class ScrollView(StencilView):
|
|||
and self.effect_x:
|
||||
width = self.width
|
||||
if touch.ud.get('in_bar_x', False):
|
||||
dx = touch.dx / float(width - width * self.hbar[1])
|
||||
self.scroll_x = min(max(self.scroll_x + dx, 0.), 1.)
|
||||
self._trigger_update_from_scroll()
|
||||
if self.hbar[1] != 1:
|
||||
dx = touch.dx / float(width - width * self.hbar[1])
|
||||
self.scroll_x = min(max(self.scroll_x + dx, 0.), 1.)
|
||||
self._trigger_update_from_scroll()
|
||||
else:
|
||||
if self.scroll_type != ['bars']:
|
||||
self.effect_x.update(touch.x)
|
||||
|
|
Loading…
Reference in New Issue