layout: fix issue when layout are not relayout themself after an add to parent.

This commit is contained in:
Mathieu Virbel 2012-01-25 02:53:55 +01:00
parent 7fea0de319
commit 3b63176d90
3 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,6 @@ To draw a button in the lower-right corner ::
__all__ = ('AnchorLayout', )
from kivy.clock import Clock
from kivy.uix.layout import Layout
from kivy.properties import NumericProperty, OptionProperty
@ -49,6 +48,7 @@ class AnchorLayout(Layout):
def __init__(self, **kwargs):
super(AnchorLayout, self).__init__(**kwargs)
self.bind(
parent = self._trigger_layout,
padding = self._trigger_layout,
anchor_x = self._trigger_layout,
anchor_y = self._trigger_layout,

View File

@ -76,6 +76,7 @@ class BoxLayout(Layout):
padding = self._trigger_layout,
children = self._trigger_layout,
orientation = self._trigger_layout,
parent = self._trigger_layout,
size = self._trigger_layout,
pos = self._trigger_layout)

View File

@ -213,7 +213,6 @@ class GridLayout(Layout):
def __init__(self, **kwargs):
self._cols = self._rows = None
self._trigger_layout = Clock.create_trigger(self.do_layout, -1)
super(GridLayout, self).__init__(**kwargs)
self.bind(
@ -223,6 +222,7 @@ class GridLayout(Layout):
row_force_default = self._trigger_layout,
cols = self._trigger_layout,
rows = self._trigger_layout,
parent = self._trigger_layout,
spacing = self._trigger_layout,
padding = self._trigger_layout,
children = self._trigger_layout,