Add scrollbar support to UIDropdown#2833
Open
benjamin-kirkbride wants to merge 3 commits intodevelopmentfrom
Open
Add scrollbar support to UIDropdown#2833benjamin-kirkbride wants to merge 3 commits intodevelopmentfrom
benjamin-kirkbride wants to merge 3 commits intodevelopmentfrom
Conversation
The dropdown menu now wraps options in a UIScrollArea with a UIScrollBar, preventing the menu from extending beyond the window when there are many options. A new max_height parameter (default 200px) controls when scrolling activates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
- Add invert_scroll, scroll_speed, show_scroll_bar parameters to UIDropdown - Add 12 integration tests covering the full PR test plan - Update CHANGELOG, tutorial docs, and examples with scroll features - Examples now use many options to demonstrate scrolling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UIScrollArea+UIScrollBar, preventing the menu from overflowing the window when there are many optionsmax_heightparameter (default 200px) toUIDropdownto control when scrolling activates_options_layoutinside the scroll area, withadd_option()andclear_options()methods on the overlayTest plan
max_heightwith a functional scrollbarmax_heightvalues🤖 Generated with Claude Code