Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #722 from Titousensei/master

Fix for bug #706
  • Loading branch information...
commit 91fd32617674a8dccb9bd71529bb0fb84af6c205 2 parents 80bc893 + 66d0f33
@tito tito authored
Showing with 9 additions and 6 deletions.
  1. +9 −6 kivy/uix/boxlayout.py
View
15 kivy/uix/boxlayout.py
@@ -149,12 +149,14 @@ def do_layout(self, *largs):
h = shh * (selfh - padding2)
for key, value in c.pos_hint.iteritems():
+ posy = value * (selfh - padding2)
if key == 'y':
- cy = y + value * h
+ cy = y + posy
elif key == 'top':
- cy = y + selfh - value * h
+ cy = y + posy - h
elif key == 'center_y':
- cy = y + selfh / 2. - (value * h)
+ cy = y - h / 2. + posy
+
c.x = cx
c.y = cy
c.width = w
@@ -178,12 +180,13 @@ def do_layout(self, *largs):
w = shw * (selfw - padding2)
for key, value in c.pos_hint.iteritems():
+ posx = value * (selfw - padding2)
if key == 'x':
- cx = x + value * w
+ cx = x + posx
elif key == 'right':
- cx = x + selfw - value * w
+ cx = x + posx - w
elif key == 'center_x':
- cx = x + selfw / 2. - (value * w)
+ cx = x - w / 2. + posx
c.x = cx
c.y = cy
Please sign in to comment.
Something went wrong with that request. Please try again.