Skip to content

Commit fcbcd60

Browse files
Fix overlay sizing by using size_hint=None
The UIManager was overriding the overlay rect set by UIDropdown.do_layout because size_hint=(0, 0) caused it to be resized to 0x0. Using size_hint=None prevents the UIManager from touching the size. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0117d29 commit fcbcd60

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arcade/gui/widgets/dropdown.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class _UIDropdownOverlay(UIFocusMixin, UIBoxLayout):
2626

2727
def __init__(self, max_height: float = 200):
2828
# Horizontal layout: [scroll_area | scroll_bar]
29-
super().__init__(vertical=False, align="top", size_hint=(0, 0))
29+
# size_hint=None prevents UIManager from overriding the rect
30+
# that UIDropdown.do_layout explicitly sets.
31+
super().__init__(vertical=False, align="top", size_hint=None)
3032
self._max_height = max_height
3133

3234
self._options_layout = UIBoxLayout(size_hint=(1, 0))

0 commit comments

Comments
 (0)