Repository navigation
Add a scrollbar and mouse wheel scrolling to select boxes - #65
Merged
Flamefire merged 2 commits intoNov 19, 2026
Merged
Conversation
- Draw a scrollbar track with a draggable slider between the scroll buttons - Scroll by whole lines and only draw/click the visible entries - Show the scroll buttons and scrollbar only when needed - Make the whole row of an entry clickable - Scroll select boxes with the mouse wheel: the wheel goes to the topmost window under the cursor, otherwise to the active menus
Flamefire
requested changes
Nov 19, 2026
Flamefire
left a comment
Member
There was a problem hiding this comment.
Looks good, some suggestions inline for polishing
- Give the scrollbar slider a minimum height of one scroll button, capped at the track height, and map the scroll range onto the slider range so the slider reaches both ends of the track exactly - Don't draw the track and slider if the track is shorter than the minimum slider height, drawButtonBox would underflow below 4px - Rename CSelectBox::scroll to scrollBy and document it - Add CButton::getRect and use getRect for buttons and windows - Clarify some comments and document the slider helpers
Flamefire
approved these changes
Nov 19, 2026
Flamefire
left a comment
Member
There was a problem hiding this comment.
I assume you tested that it works manually, so LGTM
Contributor
Author
|
yes, I tested it manually. |
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.
You can see this scrollbar in action when you start the editor and press F1 to show the help-window. The scrollbar on the right contains the changes. Also, the window is now accepting the scroll-wheel.
Tested on Windows 11 and Linux (Wayland and X11).
I need this PR for the upcoming zoom feature.