Skip to content

Commit

Permalink
Fix AnchorLayout children height bug (kivy#8669)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanouasyn committed Apr 3, 2024
1 parent 5d17b27 commit 49d6fef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kivy/uix/anchorlayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@ def do_layout(self, *largs):
cw = shw_min
elif shw_max is not None and cw > shw_max:
cw = shw_max
c.width = cw

if shh is not None:
ch = shh * (height - pad_top - pad_bottom)
if shh_min is not None and ch < shh_min:
ch = shh_min
elif shh_max is not None and ch > shh_max:
ch = shh_max
c.height = ch

if anchor_x == 'left':
x = x + pad_left
Expand All @@ -119,4 +121,3 @@ def do_layout(self, *largs):
y = y + (height - pad_top + pad_bottom - ch) / 2

c.pos = x, y
c.size = cw, ch

0 comments on commit 49d6fef

Please sign in to comment.