diff --git a/examples/tutorials/pong/steps/step4/main.py b/examples/tutorials/pong/steps/step4/main.py index 33691a56f..febc34b6c 100644 --- a/examples/tutorials/pong/steps/step4/main.py +++ b/examples/tutorials/pong/steps/step4/main.py @@ -8,7 +8,7 @@ from random import randint class PongBall(Widget): - velocity_x = NumericProperty(1) + velocity_x = NumericProperty(0) velocity_y = NumericProperty(0) velocity = ReferenceListProperty(velocity_x, velocity_y) diff --git a/kivy/uix/splitter.py b/kivy/uix/splitter.py index 35d31d310..6b096a01f 100644 --- a/kivy/uix/splitter.py +++ b/kivy/uix/splitter.py @@ -212,14 +212,12 @@ class Splitter(BoxLayout): diff_y = (touch.dy) if sz_frm == 'b': sign = -1 - if not self.size_hint_y: - if self.height > 0: - self.height += sign * diff_y - else: - self.height = 1 + if self.size_hint_y: + self.size_hint_y = None + if self.height > 0: + self.height += sign * diff_y else: - diff = (diff_y / self.parent.height) - self.size_hint_y += sign * (diff) + self.height = 1 height = self.height self.height = max(min_size, min(height, max_size)) @@ -227,14 +225,12 @@ class Splitter(BoxLayout): diff_x = (touch.dx) if sz_frm == 'l': sign = -1 - if not self.size_hint_x: - if self.width > 0: - self.width += sign * (diff_x) - else: - self.width = 1 + if self.size_hint_x: + self.size_hint_x = None + if self.width > 0: + self.width += sign * (diff_x) else: - diff = (diff_x / self.parent.width) - self.size_hint_x += sign * (diff) + self.width = 1 width = self.width self.width = max(min_size, min(width, max_size))