Skip to content

Commit

Permalink
Merge commit '252387ca24aa8840c8dab001ad6f642251e13a07' into Python3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Ev0-BH committed Apr 29, 2024
2 parents bed0997 + 252387c commit cbb696f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/python/Screens/ChoiceBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ def autoResize(self):
if textsize[0] < textsize[1]:
textsize = (textsize[1], textsize[0] + 10)
listLen = len(self.list)
listMaxItems = int((desktop_h * 0.8 - textsize[1]) // itemheight)
listMaxItems = int(desktop_h * 0.8 - textsize[1]) // itemheight
scrollbar = self["list"].instance.getScrollbarWidth() + 5 if listLen > listMaxItems else 0
listWidth = int(min(self["list"].instance.getMaxItemTextWidth() + scrollbar, desktop_w * 0.9))
count = min(listLen, listMaxItems)
if textsize[1] and textsize[0] < listWidth:
textsize = (listWidth, textsize[1])
width = max(listWidth, textsize[0])
listsize = (width, listMaxItems * itemheight)
listPos = separator + (textsize[1] if textsize[1] > 0 else 0)
listPos = separator + textsize[1] if textsize[1] > 0 else margin
# resize label
self["text"].instance.resize(eSize(*textsize))
self["text"].instance.move(ePoint(margin, margin))
Expand Down

0 comments on commit cbb696f

Please sign in to comment.