Reorder BoxLayout padding property.

This commit is contained in:
Ian Foote 2013-04-07 17:14:29 +01:00
parent a3cb6b04e7
commit fdd81c41ac
1 changed files with 8 additions and 13 deletions

View File

@ -76,16 +76,11 @@ class BoxLayout(Layout):
'''
padding = VariableListProperty([0, 0, 0, 0])
'''Padding between layout box and children, in pixels.
'''Padding between layout box and children: [padding_left, padding_top,
padding_right, padding_bottom].
padding[0] represents the top padding, padding[1] the right padding,
padding[2] the bottom padding and padding[3] the left padding.
If padding is given only two arguments, the first will represent top and
bottom padding, and the second left and right padding.
If padding is given only one argument, it will represent all four
directions.
padding also accepts a two argument form [padding_horizontal,
padding_vertical] and a one argument form [padding].
.. versionchanged:: 1.7.0
@ -123,10 +118,10 @@ class BoxLayout(Layout):
selfy = self.y
selfw = self.width
selfh = self.height
padding_top = self.padding[0]
padding_right = self.padding[1]
padding_bottom = self.padding[2]
padding_left = self.padding[3]
padding_left = self.padding[0]
padding_top = self.padding[1]
padding_right = self.padding[2]
padding_bottom = self.padding[3]
spacing = self.spacing
orientation = self.orientation
padding_x = padding_left + padding_right